Skip to content
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

Update babel monorepo to v7.0.0 #26497

Merged
merged 4 commits into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ const config = {
[
'@babel/transform-runtime',
{
corejs: false, // we polyfill so we don't need core-js
helpers: true,
polyfill: false,
regenerator: false,
useESModules: false,
Copy link
Member

@gziolo gziolo Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use Babel helpers with import/export syntax by enabling useESModules?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useESModules: true indeed looks interesting: the Babel helpers (i.e., node_modules/@babel/runtime/helpers/esm/inherits.js) are then imported in a ES6 module rather than CommonJS version. There is negligible impact on build size though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, given that polyfills are off, it probably doesn't matter.

},
],
isCalypsoClient && './inline-imports.js',
Expand Down
1 change: 1 addition & 0 deletions client/lib/media/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe( 'MediaActions', () => {
sandbox.stub( stubs, 'mediaDelete' ).callsArgWithAsync( 0, null, DUMMY_API_RESPONSE );
MediaActions._fetching = {};
window.FileList = function() {};
window.FileList.prototype[ Symbol.iterator ] = Array.prototype[ Symbol.iterator ];
window.URL = { createObjectURL: sandbox.stub() };
mockReduxPostId = null;
} );
Expand Down
Loading