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

fix(web): enable webpack tree shaking by default #8296

Merged
merged 1 commit into from May 30, 2022

Conversation

macchiitaka
Copy link
Contributor

@macchiitaka macchiitaka commented Dec 24, 2021

webpack tree shaking does not work by default in nx version 13. It worked in version 12.
The reason why it doesn't work is that optimization.sideEffects is set to false.

Tells webpack to recognise the sideEffects flag in package.json

cf. Optimization | webpack

Current Behavior

webpack tree shaking does not work.

Expected Behavior

webpack tree shaking works by default.

Related Issue(s)

#7283 (comment)

@vercel
Copy link

vercel bot commented Dec 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/77W6ANmHP4VNY2mmLBbzjpFuwr9B
✅ Preview: Canceled

@macchiitaka macchiitaka changed the title fix(web): enable tree shaking fix(web): enable tree shaking by default Dec 24, 2021
@macchiitaka macchiitaka changed the title fix(web): enable tree shaking by default fix(web): enable webpack tree shaking by default Dec 24, 2021
@vsavkin vsavkin force-pushed the master branch 2 times, most recently from 3a99403 to 334c230 Compare January 6, 2022 18:35
@nadeemkhedr
Copy link

Plans to merge this PR? How can I enable that for now?

@jaysoo jaysoo merged commit 85b1857 into nrwl:master May 30, 2022
@macchiitaka macchiitaka deleted the fix/tree-shaking branch November 17, 2022 05:20
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants