-
Notifications
You must be signed in to change notification settings - Fork 31
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
build: use rollup bundler #335
Conversation
e687659
to
7ab3e89
Compare
.nvmrc
Outdated
v13.8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use a non-dev version of node?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, would be nice use LTS
.nvmrc
Outdated
v13.8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, would be nice use LTS
Purpose of PR
After getting this contentful/create-contentful-app#15 we have realized the reason for getting that warning is due to how Parcel works internally.
Given that Parcel doesn't provide clear guidance about how to deal with the problem, this PR migrates to another build tool.
Other considered options
esbuild
Configuring esbuild was super easy, incredibly quick and the bundle is eventually smaller. The problem with that is that it is considered an "existence proof", so I wasn't sure to which extent it could be trusted;
Tested cases
To make sure this change is not breaking I have replicated locally the cases we expect to have:
This what bundlers will do and it's been replicated by npm linking the package (this is what
module
inpackage.json
is for)<script>
For this I wanted to replicate the behavior of importing the package from
unpkg
(as we do in the ready-made extensions). According to the documentation, links to libraries will point to whatever is the target ofmain
. Hence, in order to test this, I have run a local server which was serving the main file and it was working.Remarks
esbuild
experience over this, but it's a risk which I am not sure we want to take;