Open justinfagnani opened 5 years ago
Hey Justin, I initially went with WebPack because of the convention "Use webpack for apps, and Rollup for libraries", but I agree that having a module output would play really nice with web components. Admittedly though, I don't have that much experience with Rollup so it will take me some time to research and create a set up for it.
Alternatively, there could be a similar package like create-lit-component
or something like that. Either way, i'll spend some time and dive into this, thanks for pointing this out :)
"Use webpack for apps, and Rollup for libraries"
I've heard this, but I don't think it's a useful convention. First, you just shouldn't bundle module-based packages at all. Second, I don't think there's a meaningful distinction between the two, except that Rollup is a lot more module friendly.
Ideally for me, this project would work without bundling, and bundling would be a production-time-only optimization, with the choice of bundler being only a light-weight opinion that users could change easily.
WebPack doesn't support module output. It's a shame that with WebPack we can't use the native module loader. Would you consider switching to Rollup?