1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-10-08 12:33:31 +00:00

Fix babel options

This commit is contained in:
tobspr
2022-06-16 11:58:49 +02:00
parent 2e1271ecb7
commit 197adf8120
4 changed files with 25 additions and 6 deletions

View File

@@ -4,7 +4,14 @@ module.exports = function (api) {
[
"@babel/preset-env",
{
targets: "cover 99.5%",
// targets: ">0.01%",
targets: {
edge: 10,
firefox: 37,
chrome: 24,
safari: 10,
ie: 10,
},
useBuiltIns: "usage",
corejs: 3,
loose: true,
@@ -14,12 +21,13 @@ module.exports = function (api) {
],
];
const plugins = [
"@babel/plugin-transform-arrow-functions",
"closure-elimination",
// var is faster than let and const!
[
"@babel/plugin-transform-block-scoping",
{
throwIfClosureRequired: false,
throwIfClosureRequired: true,
},
],
[
@@ -36,6 +44,7 @@ module.exports = function (api) {
sourceType: "unambiguous",
sourceMaps: false,
parserOpts: {},
exclude: /(core-js|babel-core|babel-runtime)/,
generatorOpts: {
retainLines: false,
compact: true,