The jsDeliver's phaser@3.80.1/+esm link doesn't work
8Observer8 opened this issue · comments
I don't know is it an issue of Phaser or jsDeliver. I have created both. The Phaser's issue: phaserjs/phaser#6840
Description
This link doesn't work: https://cdn.jsdelivr.net/npm/phaser@3.80.1/+esm Try to run the example below.
Playground: https://plnkr.co/edit/MCZZM4MzkMSkFf4V?preview
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The jsDeliver's `phaser@3.80.1/+esm` link doesn't work</title>
</head>
<body>
<p><a href="https://github.com/phaserjs/phaser/issues/6840" target="_black">Issue for Phaser</a></p>
<p><a href="https://github.com/jsdelivr/jsdelivr/issues/18585" target="_black">Issue for jsDelivr</a></p>
<script type="importmap">
{
"imports": {
"phaser3": "https://cdn.jsdelivr.net/npm/phaser@3.80.1/+esm"
// "phaser3": "https://8observer8.github.io/libs/phaser@3.80.1/phaser.esm.min.js"
}
}
</script>
<script type="module" src="./js/index.js"></script>
</body>
</html>
index.js
import { WEBGL, Game } from "phaser3";
const config = {
type: WEBGL,
width: 400,
height: 300,
scene: { preload, create, update },
backgroundColor: "#555",
};
const game = new Game(config);
function preload() {
console.log("preload");
}
function create() {}
function update() {}
Affected jsDelivr links
https://cdn.jsdelivr.net/npm/phaser@3.80.1/+esm
Response headers
Uncaught TypeError: Failed to resolve module specifier "phaser3". Relative references must start with either "/", "./", or "../".
Information
- Device OS: Windows 10
- Browser & Version: Chrome Version 126.0.6478.62 (Official Build) (64-bit)
Requisites
- I performed a cursory search of the issue tracker to avoid opening a duplicate issue.
- I checked the documentation to understand that the issue I am reporting is not normal behavior.
- I understand that not filling out this template correctly will lead to the issue being closed.
Additional content
No response