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

Support for code splitting #5

Closed
jakepusateri opened this issue Oct 25, 2018 · 2 comments
Closed

Support for code splitting #5

jakepusateri opened this issue Oct 25, 2018 · 2 comments

Comments

@jakepusateri
Copy link

With --experimentalCodeSplitting, rollup will output multiple files when you use dynamic import. Currently, the code splitting target has to be a separate package or it'll just get inlined.

Can that flag be enabled, or should it wait until rollup 1.0 lands?

I tested this locally and it does correctly create multiple files within a package. I'm not sure how it'll work in commonjs-land, but rollup 1.0 makes code splitting on by default so it'll have to work if we want to upgrade to that.

@evocateur
Copy link
Owner

I can see that as an optional config in the rollup pkg prop. Not sure it's really helpful for building npm package artifacts, however.

@evocateur
Copy link
Owner

evocateur commented Nov 7, 2018

https://github.com/evocateur/pectin/compare/esm-code-splitting has my progress so far. Got it working locally, need to fix the tests, maybe noodle a bit more on the acceptability of always enabling it...

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