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

🐛 No dead code elimation in React #678

Closed
maradotwebp opened this issue Jan 26, 2018 · 1 comment
Closed

🐛 No dead code elimation in React #678

maradotwebp opened this issue Jan 26, 2018 · 1 comment

Comments

@maradotwebp
Copy link

Choose one: is this a 🐛 bug report or 🙋 feature request?
🐛 Bug

🎛 Configuration (.babelrc, package.json, cli command)

"scripts": {
    "start": "parcel index.html",
    "deploy": "parcel build index.html --public-url / && firebase deploy"
}

🤔 Expected Behavior

Expected dead code to be eliminated when building a React project in production mode.

😯 Current Behavior

Error in console:

Uncaught Error: React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://fb.me/react-perf-use-the-production-build

💁 Possible Solution

Implement/Enable Tree Shaking.

🌍 Your Environment

Software Version(s)
Parcel 1.4.1
Node 8.4.0
Yarn 1.3.2
Operating System Windows 10
@DeMoorJasper
Copy link
Member

duplicate of #392 We're planning to add tree shaking soon!

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