From 499dabea24240670abc63b1a6f535271df6f670d Mon Sep 17 00:00:00 2001 From: Kitteh Date: Sun, 16 May 2021 13:30:31 +0100 Subject: [PATCH] Always use babel. --- webpack.config.js | 53 +++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 29 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 993aaa9..b4ea312 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,11 +15,9 @@ var babelOptions = { "corejs": { "version": 3 }, "useBuiltIns": "usage", "targets": { - "edge": "17", "firefox": "60", "chrome": "67", - "safari": "11.1", - "ie": "11" + "ie": "8" } } ] @@ -37,31 +35,6 @@ const DEBUG = MODE != "production"; let commitHash = gitRevisionPlugin.commithash(); -let devrules = [{ test: /\.tsx?$/, loader: "ts-loader" }]; -let prodrules = [{ - test: /\.ts(x?)$/, - exclude: /node_modules/, - use: [ - { - loader: 'babel-loader', - options: babelOptions - }, - { - loader: 'ts-loader' - } - ] -}, -{ - test: /\.js$/, - exclude: /node_modules/, - use: [ - { - loader: 'babel-loader', - options: babelOptions - } - ] -}]; - console.log("DEBUG:", DEBUG); module.exports = { @@ -103,7 +76,29 @@ module.exports = { "sass-loader" ], }, - ...(DEBUG ? devrules : prodrules), + { + test: /\.ts(x?)$/, + exclude: /node_modules/, + use: [ + { + loader: 'babel-loader', + options: babelOptions + }, + { + loader: 'ts-loader' + } + ] + }, + { + test: /\.js$/, + exclude: /node_modules/, + use: [ + { + loader: 'babel-loader', + options: babelOptions + } + ] + } ], }, }; \ No newline at end of file