Skip to content

Commit

Permalink
fix(storefront): STRF-8607 Unified browsers list that we support
Browse files Browse the repository at this point in the history
  • Loading branch information
jairo-bc committed Sep 21, 2020
1 parent 797b3da commit 91f6e86
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>2%, last 2 versions, Firefox ESR
35 changes: 18 additions & 17 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
module.exports = {
plugins: [
'@babel/plugin-syntax-dynamic-import', // add support for dynamic imports (used in app.js)
'lodash', // Tree-shake lodash
],
presets: [
['@babel/preset-env', {
//debug: true,
loose: true, // Enable "loose" transformations for any plugins in this preset that allow them
modules: 'auto',
useBuiltIns: 'usage', // Tree-shake babel-polyfill
targets: {
node: 'current',
},
}],
],
};
module.exports = api => {
const targets = api.env('test') ? { targets: { node: 'current' } } : null;
return {
plugins: [
'@babel/plugin-syntax-dynamic-import', // add support for dynamic imports (used in app.js)
'lodash', // Tree-shake lodash
],
presets: [
['@babel/preset-env', {
//debug: true,
loose: true, // Enable "loose" transformations for any plugins in this preset that allow them
modules: 'auto',
useBuiltIns: 'usage', // Tree-shake babel-polyfill
...targets,
}],
],
};
}
1 change: 0 additions & 1 deletion webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ module.exports = {
loose: true, // Enable "loose" transformations for any plugins in this preset that allow them
modules: false, // Don't transform modules; needed for tree-shaking
useBuiltIns: 'entry',
targets: '> 1%, last 2 versions, Firefox ESR',
corejs: '^3.6.5',
}],
],
Expand Down

0 comments on commit 91f6e86

Please sign in to comment.