From d4a616713af1906704f4ca2f095b051bff3b0b7e Mon Sep 17 00:00:00 2001 From: Surma Date: Mon, 21 May 2018 13:29:24 +0100 Subject: [PATCH] Simplify webpack config --- webpack.config.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 5b4e43a3..7d002571 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -48,18 +48,6 @@ module.exports = function (_, env) { } }, module: { - // This is needed to make webpack NOT process wasm files. - // See https://github.com/webpack/webpack/issues/6725 - defaultRules: [ - { - type: "javascript/auto", - resolve: {} - }, - { - test: /\.json$/i, - type: "json" - }, - ], rules: [ { test: /\.(scss|sass)$/, @@ -127,12 +115,14 @@ module.exports = function (_, env) { }, { test: /\/codecs\/.*\.wasm$/, + // This is needed to make webpack NOT process wasm files. + // See https://github.com/webpack/webpack/issues/6725 + type: 'javascript/auto', loader: 'file-loader', } - ] + ], }, plugins: [ - // Ignore some of the native Node modules for any of the codecs. These files are generated by Emscripten and are supposed to also work in Node, which we don‘t care about. new webpack.IgnorePlugin(/(fs)/, /\/codecs\//), // Pretty progressbar showing build progress: new ProgressBarPlugin({