Compile Babylon with Gulp (#7240)

This commit is contained in:
Nicolò Ribaudo
2018-01-30 23:13:40 +01:00
committed by GitHub
parent 73e64c6cb0
commit f19d559ff3
9 changed files with 215 additions and 128 deletions

View File

@@ -37,7 +37,6 @@ function webpackBuild(opts) {
rules: [
{
test: /\.js$/,
include: /node_modules/,
loader: "babel-loader",
options: {
// Some of the node_modules may have their own "babel" section in
@@ -53,32 +52,15 @@ function webpackBuild(opts) {
},
],
],
},
},
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
options: {
// 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"],
},
],
["@babel/stage-0", { loose: true }],
overrides: [
{
exclude: /node_modules/,
presets: [["@babel/stage-0", { loose: true }]],
},
],
},
},
],
// babylon is already bundled and does not require parsing
noParse: [/babylon\/lib/],
},
node: {
// Mock Node.js modules that Babel require()s but that we don't