NSSTC / sim-ecs

Batteries included TypeScript ECS
https://nsstc.github.io/sim-ecs/
Mozilla Public License 2.0
81 stars 12 forks source link

Fix WebPack release builds #27

Closed minecrawler closed 3 years ago

minecrawler commented 3 years ago

When building the release version of Pong, it fails at runtime with

Uncaught (in promise) Error: Component  was already registered!
    registerComponent http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:16
    withComponent http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:31
    <anonymous> http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:16
    <anonymous> http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:16
    n http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:1
    <anonymous> http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:16
    n http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:1
    <anonymous> http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:1
    <anonymous> http://localhost:63342/sim-ecs/examples/pong/public/bundle.js:1
bundle.js:16:24187

This needs further analysis, however it should be possible to build release-versions using sim-ecs, so we need urgent fixing here.