-
Notifications
You must be signed in to change notification settings - Fork 21
Use pure ES modules #451
Comments
We do bundle the code with webpack + esbuild. framework-info is relatively big, we split it from the main bundle and download it after the main bundle. |
Line 6 in 95b9819
and uses browserslist to target Line 115 in 95b9819
I think Webpack uses the Based on #152, I believe we do support quite old browsers in the UI app |
To be clear, I'm not contemplating using ESM directly on the browser at the moment, just wondering if our current setup will bundle an ESM package. |
The following items are left, in order:
|
Done! |
See background at https://github.com/netlify/team-dev/issues/36
Once #450 is done and released, we should use pure ES modules and make a major release.
This is more than just switching from CommonJS to
import
/export
. See this list for other changes which might be involved. This should be broken in many PRs, as much as possible, to lower the risk. Also, non-breaking changes (such as adding file extensions in imports, or loading JSON files differently) should be done before the breaking changes (such as usingimport
/export
statements).At the moment,
framework-info
is only used by:build-info
: so support for pure ES modules should be added first there: Use pure ES modules build-info#181netlify-cli
: same thing for Netlify CLI: Use pure ES modules cli#3514netlify-react-ui
: will this be a problem when importing this module fromnetlify-react-ui
? Do we bundle code to make ES modules work innetlify-react-ui
? Or maybe we now only support browsers with ES modules support? @nasivuela Do you know what the situation is?The text was updated successfully, but these errors were encountered: