amazon-sumerian-hosts icon indicating copy to clipboard operation
amazon-sumerian-hosts copied to clipboard

Cannot create and run "production" builds

Open sdivakarrajesh opened this issue 2 years ago • 1 comments

image

  • 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,
        },
      }),
    ],
  },

sdivakarrajesh avatar Jun 17 '23 18:06 sdivakarrajesh

Hello!

I was unable to reproduce this issue locally - are there any changes in your local version which could have impacted things? If you pull a clean version of the repo and npm run release then npm run start-babylon do you see this issue?

baxeaz avatar Jul 10 '23 18:07 baxeaz