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

[5.2.0] Unused new URL is not being tree-shaked #11818

Closed
barak007 opened this issue Oct 25, 2020 · 1 comment · Fixed by #12451
Closed

[5.2.0] Unused new URL is not being tree-shaked #11818

barak007 opened this issue Oct 25, 2020 · 1 comment · Fixed by #12451

Comments

@barak007
Copy link
Contributor

barak007 commented Oct 25, 2020

Bug report

What is the current behavior?

I'm trying to use the new asset loading api (new URL) and noticed that unused code isn't being tree-shaked

If the current behavior is a bug, please provide the steps to reproduce.

Exmaple repo
follow steps in readme

What is the expected behavior?

I expected the bundle to not contain the asset module and the dist folder to not contain the asset file.

  • When I force sideEffects false it dose remove the entire thing.

Other relevant information:
webpack version: 5.2.0
Node.js version: 12.19.0
Operating System: Windows 10
Additional tools: none

@barak007
Copy link
Contributor Author

@sokra I also notice that webpack_require.p is not being tree-shaked too. probably separate issue.

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

Successfully merging a pull request may close this issue.

2 participants