Closed bates64 closed 7 years ago
Is it possible to run Rollupify in production builds only?
@PullJosh Yeah, that's what I'm proposing.
Problem is, for development, parcel is unable to parse import/export, and in order to use rollup we need to use import/export - - we'd use browserify in dev too (with less plugins, like how the CSS is processed) but that'd certainly be slower than just using parcel.
Is that a worthwhile tradeoff for significantly smaller production files? I have no idea.
Rollupify allows us to tree-shake JavaScript, which basically means that unused functions are not included in the build. This means smaller file sizes.
Rollup, however, requires the use of ES6 modules over
require
:Problem is, parcel doesn't yet support ES6 module syntax due to its complexity. We could: