Centralize Babel's own compilation config to make it easier to follow. (#7599)

This commit is contained in:
Logan Smyth
2018-03-19 21:49:17 -07:00
committed by GitHub
parent edb0a70e14
commit 6d6fe844fd
6 changed files with 80 additions and 80 deletions

View File

@@ -39,25 +39,18 @@ function webpackBuild(opts) {
test: /\.js$/,
loader: "babel-loader",
options: {
// Use the bundled config so that module syntax is passed through
// for Webpack.
envName: "standalone",
// Some of the node_modules may have their own "babel" section in
// their project.json (or a ".babelrc" file). We need to ignore
// those as we're using our own Babel options.
babelrc: false,
presets: [
[
"@babel/env",
{
loose: true,
exclude: ["transform-typeof-symbol"],
},
],
],
overrides: [
{
exclude: /node_modules/,
presets: [["@babel/stage-0", { loose: true }]],
},
],
// We explicitly load the `.babelrc.js` file since searching is
// turned off, but we still want to use the main config.
extends: "./.babelrc.js",
},
},
],