From 59097fe5b7f7c0976fa7321f1fcd16e62b5ce7a4 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 26 Apr 2019 14:07:25 -0400 Subject: [PATCH] Framework: Omit Babel processing from Webpack configuration --- webpack.config.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/webpack.config.js b/webpack.config.js index a8b11fd9aac6f..e8f8a08b72e16 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -40,6 +40,12 @@ 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( {