Skip to content

Commit

Permalink
Merge pull request #408 from reactioncommerce/fix-aldeed-transform-mjs
Browse files Browse the repository at this point in the history
fix: babel transform mjs files
  • Loading branch information
machikoyasuda authored Apr 5, 2019
2 parents 5e6d761 + 7adaf55 commit 33651f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ ignore:
'npm:mem:20180117':
- libnpx > yargs > os-locale > mem:
reason: No update available
expires: '2019-03-31T21:10:49.245Z'
expires: '2019-05-04T20:58:36.166Z'
patch: {}
11 changes: 8 additions & 3 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,14 @@ module.exports = function (api) {
browsers: [
"last 2 versions",
"ie 11"
],
// "browsers" target is ignored when "esmodules" is true
esmodules
]
// Note: If we eventually drop IE11 supports, it should be safe
// to go back to passing `esmodules: true` here. But for now,
// we want the mjs files to be transformed to be IE11 compatible
// EXCEPT for `import`. This allows Webpack 4 to tree shake this
// package but yet still remain compatible with IE11 without
// further transformation by the app using this package.
// esmodules
},
// https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage-experimental
useBuiltIns: "usage"
Expand Down

0 comments on commit 33651f1

Please sign in to comment.