Feature request: "include" flag (i.e. opposite of "exclude")
It would be great to have a flag to indicate which modules you do wish to include in bundling.
ncc build index.ts -i foo -i bar
Would produce a bundle where the source , foo package, and bar package are bundled. Every other package dependency is referenced from node_modules.
It sounds like this could be achieved today by looping through dependencies in package.json an adding to --external, correct? Your request here is just a built-in feature to do that?
Hi there, any news on this?
Hello! I'm also interested in this.
It sounds like this could be achieved today by looping through dependencies in package.json an adding to --external, correct? Your request here is just a built-in feature to do that?
@styfle No, I think this misunderstands the request. Doesn't the --external option list modules to not include in the bundle? The OP wishes to explicitly include a module. My use case for this is needed a module included in the bundle that is not explicitly used by the bundled code itself.
@heylookltsme In that case, you could add require('something') to your entrypoint file and ncc will include it.