From e166933dbd7d5f59d9d3ab59631dea3523d56fdd Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Mon, 20 May 2019 11:45:41 -0400 Subject: [PATCH] Framework: Exclude Babel processing by build script flag --- package.json | 2 +- webpack.config.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/package.json b/package.json index 36d46c8d9b3169..bd64fcfc508fd6 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "clean:packages": "rimraf ./packages/*/build ./packages/*/build-module ./packages/*/build-style ./packages/*/node_modules", "prebuild:packages": "npm run clean:packages && lerna run build", "build:packages": "node ./bin/packages/build.js", - "build": "npm run build:packages && wp-scripts build", + "build": "npm run build:packages && wp-scripts build --no-babel", "check-engines": "wp-scripts check-engines", "check-licenses": "concurrently \"wp-scripts check-licenses --prod --gpl2\" \"wp-scripts check-licenses --dev\"", "precheck-local-changes": "npm run docs:build", diff --git a/webpack.config.js b/webpack.config.js index e7ad56a009b739..ba130ce0992d4a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -39,12 +39,6 @@ module.exports = { library: [ 'wp', '[name]' ], libraryTarget: 'this', }, - // Despite being empty, this must exist as an entry to override the default - // configuration. Gutenberg does not inherit the same Webpack rules as in - // the default. Notably, it does not require Babel processing because the - // files are transpiled by `npm run build:packages` before being processed - // by Webpack. - module: {}, plugins: [ ...defaultConfig.plugins, new DefinePlugin( {