SimonStnn / pop-a-loon

The new rising trend (literally) that changes the browser game completely.
https://pop-a-loon.gitbook.io
Apache License 2.0
11 stars 6 forks source link

Balloons images don't load in production builds #128

Closed SimonStnn closed 6 months ago

SimonStnn commented 6 months ago

Because webpack minifies the code, it also gives each class a different, shorter name. So the code used for using the constructor name does not work in production.

https://github.com/SimonStnn/pop-a-loon/blob/b96b303c9a9b95c0da6eba9d6f1da9da17cb1099/src/balloon.ts#L42-L47

For example the image URL now looks something like this: moz-extension://.../resources/balloons/a/icon.png. This is why the file cannot be loaded.