This commit is contained in:
Federico Brigante 2024-09-09 16:40:02 +06:30 коммит произвёл GitHub
Родитель 572e67a547
Коммит 3701621f6d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
6 изменённых файлов: 13 добавлений и 176 удалений

Просмотреть файл

@ -1,19 +0,0 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
"@babel/plugin-transform-modules-commonjs",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions",
"@babel/plugin-proposal-class-properties"
]
}

10
babel.config.json Normal file
Просмотреть файл

@ -0,0 +1,10 @@
{
"presets": [
[
"@babel/preset-env",
{
"modules": "commonjs"
}
]
]
}

150
package-lock.json сгенерированный
Просмотреть файл

@ -44,12 +44,6 @@
"@babel/cli": "7.25.6",
"@babel/core": "7.25.2",
"@babel/eslint-parser": "7.25.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.24.7",
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
"@babel/plugin-proposal-function-sent": "7.24.7",
"@babel/plugin-proposal-numeric-separator": "7.18.6",
"@babel/plugin-proposal-throw-expressions": "7.24.7",
"@babel/preset-env": "7.25.4",
"@babel/register": "7.24.6",
"async": "3.2.6",
@ -780,88 +774,6 @@
"@babel/core": "^7.0.0"
}
},
"node_modules/@babel/plugin-proposal-class-properties": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz",
"integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==",
"dev": true,
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.18.6",
"@babel/helper-plugin-utils": "^7.18.6"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-decorators": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz",
"integrity": "sha512-RL9GR0pUG5Kc8BUWLNDm2T5OpYwSX15r98I0IkgmRQTXuELq/OynH8xtMTMvTJFjXbMWFVTKtYkTaYQsuAwQlQ==",
"dev": true,
"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.24.7",
"@babel/helper-plugin-utils": "^7.24.7",
"@babel/plugin-syntax-decorators": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-export-namespace-from": {
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz",
"integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.18.9",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-function-sent": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-function-sent/-/plugin-proposal-function-sent-7.24.7.tgz",
"integrity": "sha512-42Pq9d8fV5CrjygcVAA7aAEFpkAJluWWvlO7bvOMDEutxIS44COcFU61V92VBzUZvOkjIoQrPJNUtmY/d9XMgA==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.24.7",
"@babel/helper-wrap-function": "^7.24.7",
"@babel/plugin-syntax-function-sent": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-numeric-separator": {
"version": "7.18.6",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz",
"integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.18.6",
"@babel/plugin-syntax-numeric-separator": "^7.10.4"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-private-property-in-object": {
"version": "7.21.0-placeholder-for-preset-env.2",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
@ -874,22 +786,6 @@
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-proposal-throw-expressions": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-throw-expressions/-/plugin-proposal-throw-expressions-7.24.7.tgz",
"integrity": "sha512-Rh4WoHyWKgsxvdkEMqDEZtKuGnZw+JwicMCvcZaIjYaQ3fK+a8JZYLhgcac9dKcL47Xqf+SG3MopTx+8BACdrQ==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.24.7",
"@babel/plugin-syntax-throw-expressions": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-async-generators": {
"version": "7.8.4",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
@ -941,21 +837,6 @@
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-decorators": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.24.7.tgz",
"integrity": "sha512-Ui4uLJJrRV1lb38zg1yYTmRKmiZLiftDEvZN2iq3kd9kUFU+PttmzTbAFC2ucRk/XJmtek6G23gPsuZbhrT8fQ==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-dynamic-import": {
"version": "7.8.3",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
@ -980,21 +861,6 @@
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-function-sent": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-function-sent/-/plugin-syntax-function-sent-7.24.7.tgz",
"integrity": "sha512-me5EHEx4GXxAE8mnlZaWA+ARIyMSPOXcw6WlqWGIfTg36oeWm4FxR/Djs1DGPbmSIwJqMboiN7gK8eCyzyNK2A==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-import-assertions": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.24.7.tgz",
@ -1151,21 +1017,6 @@
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-throw-expressions": {
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-throw-expressions/-/plugin-syntax-throw-expressions-7.24.7.tgz",
"integrity": "sha512-b1bdlAmUTy9VQ/g2cnBuJFwd7jeARNW2F65c9Gcn8qyNYGuVy/cYyqpiSL6SVmUAJTDbIYL2FzlZ8nH1qUCBXA==",
"dev": true,
"dependencies": {
"@babel/helper-plugin-utils": "^7.24.7"
},
"engines": {
"node": ">=6.9.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
}
},
"node_modules/@babel/plugin-syntax-top-level-await": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
@ -1587,6 +1438,7 @@
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.24.8.tgz",
"integrity": "sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-module-transforms": "^7.24.8",
"@babel/helper-plugin-utils": "^7.24.8",

Просмотреть файл

@ -76,12 +76,6 @@
"@babel/cli": "7.25.6",
"@babel/core": "7.25.2",
"@babel/eslint-parser": "7.25.1",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.24.7",
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
"@babel/plugin-proposal-function-sent": "7.24.7",
"@babel/plugin-proposal-numeric-separator": "7.18.6",
"@babel/plugin-proposal-throw-expressions": "7.24.7",
"@babel/preset-env": "7.25.4",
"@babel/register": "7.24.6",
"async": "3.2.6",

Просмотреть файл

@ -24,7 +24,7 @@ module.exports = {
rules: [
{
use: 'babel-loader',
// babel options are in .babelrc
// babel options are in babel.config.json
exclude: /(node_modules|bower_components)/,
test: /\.js$/,
},

Просмотреть файл

@ -5,7 +5,7 @@ const webpack = require('webpack');
const webpackConfig = require('./webpack.config');
const babelrc = fs.readFileSync('./.babelrc');
const babelrc = fs.readFileSync('./babel.config.json');
const babelrcObject = JSON.parse(babelrc);
const babelPlugins = babelrcObject.plugins || [];