1
0
Fork 0

Always use babel.

This commit is contained in:
Kitteh 2021-05-16 13:30:31 +01:00
parent f4ab8f212e
commit 499dabea24

View file

@ -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
}
]
}
],
},
};