Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create and run "production" builds #173

Open
sdivakarrajesh opened this issue Jun 17, 2023 · 1 comment
Open

Cannot create and run "production" builds #173

sdivakarrajesh opened this issue Jun 17, 2023 · 1 comment

Comments

@sdivakarrajesh
Copy link

sdivakarrajesh commented Jun 17, 2023

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,
        },
      }),
    ],
  },
@baxeaz
Copy link

baxeaz commented Jul 10, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants