-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Library Export Default Webpack Plugin: Rewrite as CommonJS #15710
Library Export Default Webpack Plugin: Rewrite as CommonJS #15710
Conversation
Do we have a rule for dropping the |
@@ -0,0 +1,5 @@ | |||
## Unreleased |
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.
Is it master or unreleased?
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.
Master - we should update our docs
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.
Master - we should update our docs
See: #15740
The gutenberg/test/unit/jest.config.js Lines 6 to 8 in d08dcd8
These could be updated to avoid making assumptions, I think. In the meantime, however, it seems safer to keep them out of that directory. There are some some benefits to this as well:
|
Makes sense. Thanks 👍 |
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.
Yes, let’s do it 👍
See: https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff
There is also commonjs value proposed. We should add this new field to all packages and start using it with the script which picks which packages should be transpiled. This is going to solve the issue with special handling for src folder. |
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.
I now see that here the lock file needs to get regenerated as well. Our script on Travis seems to not work properly anymore.
In another pull request (I can't specifically recall), we tracked it back to an issue where |
368a8a1
to
3108745
Compare
Resolved |
Extracted from: #15226
This pull request seeks to expose the source of
LibraryExportDefaultWebpackPlugin
directly as its source, omitting it from the Babel transpilation build step. The proposed benefit is to reduce overhead by limiting the number of Babel-transpiled packages, to accurately reflect the current source as being CommonJS and, depending on the outcome of #15226, avoid dependencies on a built package from the project's own build tooling (Webpack). The main downside is fragmentation on which packages are and aren't transpiled by Babel.Testing instructions:
Verify build succeeds: