-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "perf(es5): Remove legacy es5 bundling resources #63"
This reverts commit a48216c.
- Loading branch information
1 parent
a31f50b
commit 57e1c33
Showing
7 changed files
with
1,413 additions
and
1,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const { browserslist: defaultBrowserslist } = require('./package.json'); | ||
|
||
const modernBrowserslist = defaultBrowserslist.filter( | ||
(browser) => browser !== 'ie 11' | ||
); | ||
|
||
const sharedPlugins = [ | ||
'@babel/plugin-syntax-dynamic-import', | ||
[ | ||
'@babel/plugin-transform-runtime', | ||
{ | ||
useESModules: true | ||
} | ||
] | ||
]; | ||
|
||
module.exports = { | ||
exclude: [ | ||
'node_modules/@babel/**', | ||
'node_modules/core-js/**', | ||
'node_modules/@webcomponents/webcomponentsjs/**' | ||
], | ||
env: { | ||
modern: { | ||
// lit-element supports the last two versions of modern browsers, so we don't need to polyfill | ||
exclude: ['node_modules/lit-element/**', 'node_modules/lit-html/**'], | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: modernBrowserslist.join(', '), | ||
useBuiltIns: 'usage', | ||
corejs: 3 | ||
} | ||
] | ||
], | ||
plugins: sharedPlugins | ||
}, | ||
legacy: { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: defaultBrowserslist.join(', '), | ||
useBuiltIns: 'usage', | ||
corejs: 3 | ||
} | ||
] | ||
], | ||
plugins: sharedPlugins | ||
} | ||
} | ||
}; |
Oops, something went wrong.