New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Rollup and just use Webpack #9
Comments
It looks like ES modules may not be possible until Webpack 5 Is tree-shaking a must-have?
|
Why not just transpile with babel and do nothing else? |
For now using rollup as a "task runner" lets us emit ESM. If we just run babel, aliases won't be resolved in stylesheets. Relative paths in stylesheets may also break. I used rollup-plugin-rebase to address this in a hacky way. |
This leaves us with the question:
|
For now, rollup is used to create an ESM and a UMD bundle both with peer dependencies, instead of tackling questions with CommonJS etc. |
Rollup is an additional dependency, that has its own set of problems and plugins.
I didn't use Webpack initially, because I just went with what works.
To use Webpack, we have to remove the HTML plugin, and change the inputs/outputs. This doesn't seem like that much work using the craco utils?
Update: and then the bundled code needs to be built in a format that allows the most flexible use - it seems like we would want ESM bundles to let motherships use treeshaking across the fleet
The text was updated successfully, but these errors were encountered: