Simulating Rollup’s preserveModules in Webpack 4

Viewed 338

I am authoring an ES2015 library that I want to be tree-shakable.

Can I simulate Rollup’s preserveModules option in Webpack 4 by including all my library source code files as Webpack’s entries (e.g. using glob) and using esm-webpack-plugin?

How about using webpack-rollup-loader? Anybody tried it for this matter?

Thank you!

0 Answers
Related