Extract targets parser and compat data from preset-env (#10899)

* Extract targets parser and compat data from preset-env

* Review by Jùnliàng

* isItemRequired -> targetsSupported

* Export isRequired
This commit is contained in:
Nicolò Ribaudo
2020-01-10 03:15:20 +01:00
committed by GitHub
parent 5f807ae45b
commit 04354d1556
59 changed files with 936 additions and 707 deletions

View File

@@ -181,7 +181,12 @@ function buildRollup(packages) {
},
}),
rollupCommonJs({
include: [/node_modules/, "packages/babel-preset-env/data/**"],
include: [
/node_modules/,
"packages/babel-preset-env/data/*.js",
// Rollup doesn't read export maps, so it loads the cjs fallback
"packages/babel-compat-data/*.js",
],
namedExports: {
"babel-plugin-dynamic-import-node/utils.js": [
"createDynamicImportTransform",