Replies: 1 comment 2 replies
-
@kamranayub Is this because of the experimental esm module support in v0.25.x you think? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I ran into an issue (which I fixed) but it will happen to other people so I want to offer a better way of fixing it.
I initially downloaded https://github.com/excaliburjs/sample-shootemup and started making progress on my game. I wanted to upgrade to version 0.25.0 and when I tried, I received a webpack error
Uncaught TypeError: __webpack_require__.r is not a function
in the console.I know my way around webpack so I quickly found out that you've migrated to webpack 5 for the 0.25.0 version. I fixed it by migrating my game to use https://github.com/excaliburjs/template-ts-webpack. This would've been a showstopper for a less experienced person, though.
The main question i have is why do you bundle the library with webpack for NPM distribution? Ideally, you should build it with
tsc
and leave it to the user to bundle the library.One reason might be because you want a simple
excalibur.min.js
which game devs can just add to their HTML and use it straight away but that's a special case and should be handled separately (and deployed to CDN).Beta Was this translation helpful? Give feedback.
All reactions