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

Is there any tree-shaking strategy? #1055

Open
SandZn opened this issue Mar 19, 2023 · 3 comments
Open

Is there any tree-shaking strategy? #1055

SandZn opened this issue Mar 19, 2023 · 3 comments

Comments

@SandZn
Copy link

SandZn commented Mar 19, 2023

Hi, is there any tree-shaking strategy in ncc, like what bundlers do on front-end applications? I wonder how do you deal with the dynamic "require" while compiling. Thank you.

@cerjs
Copy link

cerjs commented Apr 24, 2023

Meet the same question. Ncc always ignore process.env.NODE_ENV == production, and build all.

@BenJackGill
Copy link

+1

Tree shaking would be fantastic.

@gregg-cbs
Copy link

I have noticed that if i import from a package like this:
import {find as event_find} from "event";

The whole package gets bundled. All the methods that I am not using from the 'event' package are getting bundled too.

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

4 participants