aws-samples / aws-samples/amazon-sumerian-hosts

Cannot create and run "production" builds

Open
#173 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
210
Forks
83
PR merge metrics
No merged PRs in 30d

Description

![image](https://github.com/aws-samples/amazon-sumerian-hosts/assets/30803637/b1c563b1-f034-4042-bf0a-fb2004a7d148)
- I'm using the CustomCharacterDemo.js. The apps seems fine and work when we start using `npm run start-babylon`.
- But when i build it with NODE_ENV=production, the class names become, for example, in this case filename_classname.
- i see that the classnames are used throughout whenever a feature is installed, example: Host.AnimationFeature and Host.TextToSpeechFeature.
- When building using "production" the class names are messed up and "AnimationFeature" becomes "AnimationFeature_AnimationFeature" and Host.AnimationFeature.addLayer("something") throws an error
- This is how my webpack config optimizations block looks like
```
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
},
}),
],
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.