Open 8Observer8 opened 2 weeks ago
jsDelivr is taking a perfectly valid ESM module and then running it through Rollup and Terser again. For reasons best known only to them. I assume it's screwing-up Phaser in the process. Maybe this works on some projects, but I doubt it will on Phaser until we move to being a purely ESM based library.
You can use https://cdn.jsdelivr.net/npm/phaser@3.80.1/dist/phaser.esm.js etc. instead.
I prefer to use GitHub Pages because there are problems sometimes with UNPKG and jsDelivr. I have made this page for some libraries: https://8observer8.github.io/tutorials/setup/how-to-setup-js-libraries-as-es6-modules/public/index.html
Phaser 3:
You can use these links for @box2d/core:
GitHub Pages:
Skypack:
jsDelivr:
These links do not work:
I don't know is it an issue of jsDeliver or Phaser. I have created both. The jsDeliver's issue: https://github.com/jsdelivr/jsdelivr/issues/18585
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
index.js