Fix babel options

pull/1440/head
tobspr 2 years ago
parent 2e1271ecb7
commit 197adf8120

@ -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,

@ -8,8 +8,10 @@
},
"author": "tobspr",
"license": "private",
"browserslist": "> 0.01%",
"dependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-transform-arrow-functions": "^7.17.12",
"@babel/plugin-transform-block-scoping": "^7.4.4",
"@babel/plugin-transform-classes": "^7.5.5",
"@babel/preset-env": "^7.5.4",

@ -8,8 +8,6 @@ const TerserPlugin = require("terser-webpack-plugin");
const StringReplacePlugin = require("string-replace-webpack-plugin");
const UnusedFilesPlugin = require("unused-files-webpack-plugin").UnusedFilesWebpackPlugin;
const { checkModules, buildExcludeRegexp } = require("are-you-es5");
module.exports = ({
environment,
es6 = false,
@ -213,7 +211,6 @@ module.exports = ({
},
{
test: /\.js$/,
exclude: buildExcludeRegexp(moduleExclusionResult.es6Modules),
use: [
// "thread-loader",
{
@ -243,7 +240,6 @@ module.exports = ({
},
{
test: /\.worker\.js$/,
exclude: buildExcludeRegexp(moduleExclusionResult.es6Modules),
use: [
{
loader: "worker-loader",

@ -144,6 +144,11 @@
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz"
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
"@babel/helper-plugin-utils@^7.17.12":
version "7.17.12"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96"
integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz"
@ -310,6 +315,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-transform-arrow-functions@^7.17.12":
version "7.17.12"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45"
integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA==
dependencies:
"@babel/helper-plugin-utils" "^7.17.12"
"@babel/plugin-transform-arrow-functions@^7.2.0":
version "7.2.0"
resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz"

Loading…
Cancel
Save