[build] Always transpile everything (#4548)
parent
e42db35427
commit
174a7736c1
|
@ -60,9 +60,9 @@
|
|||
"unified": "6.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.0.0-beta.40",
|
||||
"@babel/core": "7.0.0-beta.40",
|
||||
"@babel/preset-env": "7.0.0-beta.40",
|
||||
"@babel/cli": "7.0.0-beta.48",
|
||||
"@babel/core": "7.0.0-beta.48",
|
||||
"@babel/preset-env": "7.0.0-beta.48",
|
||||
"builtin-modules": "2.0.0",
|
||||
"codecov": "2.2.0",
|
||||
"cross-env": "5.0.5",
|
||||
|
|
|
@ -36,10 +36,6 @@ const EXTERNALS = [
|
|||
];
|
||||
|
||||
function getBabelConfig(bundle) {
|
||||
if (bundle.type !== "core" && !bundle.transpile) {
|
||||
return;
|
||||
}
|
||||
|
||||
const config = {
|
||||
babelrc: false,
|
||||
plugins: []
|
||||
|
@ -49,16 +45,14 @@ function getBabelConfig(bundle) {
|
|||
require.resolve("./babel-plugins/transform-custom-require")
|
||||
);
|
||||
}
|
||||
if (bundle.transpile) {
|
||||
const targets = { node: 4 };
|
||||
if (bundle.target === "universal") {
|
||||
// From https://jamie.build/last-2-versions
|
||||
targets.browsers = [">0.25%", "not ie 11", "not op_mini all"];
|
||||
}
|
||||
config.presets = [
|
||||
[require.resolve("@babel/preset-env"), { targets, modules: false }]
|
||||
];
|
||||
const targets = { node: 4 };
|
||||
if (bundle.target === "universal") {
|
||||
// From https://jamie.build/last-2-versions
|
||||
targets.browsers = [">0.25%", "not ie 11", "not op_mini all"];
|
||||
}
|
||||
config.presets = [
|
||||
[require.resolve("@babel/preset-env"), { targets, modules: false }]
|
||||
];
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,6 @@ const path = require("path");
|
|||
* @property {CommonJSConfig} [commonjs={}] - options for `rollup-plugin-commonjs`
|
||||
* @property {string[]} external - array of paths that should not be included in the final bundle
|
||||
* @property {Object.<string, string>} replace - map of strings to replace when processing the bundle
|
||||
* @property {boolean} [transpile=false] - wether to transpile the bundle to ES2015
|
||||
|
||||
* @typedef {Object} CommonJSConfig
|
||||
* @property {Object} namedExports - for cases where rollup can't infer what's exported
|
||||
|
@ -62,8 +61,7 @@ const parsers = [
|
|||
"node_modules/@glimmer/syntax/dist/modules/es2017/index.js": "default"
|
||||
},
|
||||
ignore: ["source-map"]
|
||||
},
|
||||
transpile: true
|
||||
}
|
||||
},
|
||||
{
|
||||
input: "src/language-html/parser-parse5.js",
|
||||
|
|
Loading…
Reference in New Issue