gulp-better-rollup
gulp-better-rollup copied to clipboard
Add support for `experimentalCodeSplitting` option
Rollup has an experimentalCodeSplitting
option:
true or false (defaults to false) – enables you to specify multiple entry points. If this option is enabled, input can be set to an array of entry points to be built into the folder at the provided output.dir.
- Filenames of generated chunks in the output.dir folder correspond to the entry point filenames.
- Shared chunks are generated automatically to avoid code duplication between chunks.
- Enable the experimentalDynamicImport flag to generate new chunks for dynamic imports as well.
output.dir and input as an array must both be provided for code splitting to work, the output.file option is not compatible with code splitting workflows.
In my opinion, this is the most valuable option that rollup has, and it would be really great to have that feature here!
Hi. I'm sorry but I'm not maintaining this module anymore because I changed my workflow (not using gulp anymore, just rollup cli). But I would happily accept PR if you would wish to implement this yourself.