Use @babel/preset-react preset
This commit is contained in:
parent
d02aa74413
commit
c268768187
4 changed files with 1022 additions and 10810 deletions
11
.babelrc
11
.babelrc
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"presets": ["@babel/preset-env"],
|
|
||||||
"plugins": [
|
|
||||||
"@babel/plugin-transform-runtime",
|
|
||||||
"@babel/plugin-syntax-dynamic-import",
|
|
||||||
"@babel/plugin-transform-react-jsx",
|
|
||||||
"@babel/plugin-syntax-function-bind",
|
|
||||||
"@babel/plugin-proposal-function-bind",
|
|
||||||
["@babel/plugin-proposal-class-properties", {loose: true}],
|
|
||||||
]
|
|
||||||
}
|
|
||||||
12
babel.config.js
Normal file
12
babel.config.js
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
module.exports = {
|
||||||
|
presets: [
|
||||||
|
['@babel/preset-env', { targets: { node: 'current' } }],
|
||||||
|
'@babel/preset-react',
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
'@babel/plugin-transform-runtime',
|
||||||
|
'@babel/plugin-syntax-function-bind',
|
||||||
|
'@babel/plugin-proposal-function-bind',
|
||||||
|
['@babel/plugin-proposal-class-properties', { loose: true }],
|
||||||
|
],
|
||||||
|
};
|
||||||
11800
package-lock.json
generated
11800
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -9,7 +9,7 @@
|
||||||
"build": "npx webpack --config webpack.dev.babel.js",
|
"build": "npx webpack --config webpack.dev.babel.js",
|
||||||
"build:watch": "npx webpack --config webpack.dev.babel.js --watch",
|
"build:watch": "npx webpack --config webpack.dev.babel.js --watch",
|
||||||
"build:prod": "npx webpack --config webpack.prod.babel.js",
|
"build:prod": "npx webpack --config webpack.prod.babel.js",
|
||||||
"test": "npx jest",
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
||||||
"test:watch": "npm test -- --watch"
|
"test:watch": "npm test -- --watch"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
@ -32,14 +32,13 @@
|
||||||
"@babel/core": "^7.12.13",
|
"@babel/core": "^7.12.13",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
"@babel/plugin-proposal-class-properties": "^7.12.13",
|
||||||
"@babel/plugin-proposal-function-bind": "^7.12.13",
|
"@babel/plugin-proposal-function-bind": "^7.12.13",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
||||||
"@babel/plugin-syntax-function-bind": "^7.12.13",
|
"@babel/plugin-syntax-function-bind": "^7.12.13",
|
||||||
"@babel/plugin-transform-react-jsx": "^7.12.13",
|
|
||||||
"@babel/plugin-transform-runtime": "^7.12.15",
|
"@babel/plugin-transform-runtime": "^7.12.15",
|
||||||
"@babel/preset-env": "^7.12.13",
|
"@babel/preset-env": "^7.12.13",
|
||||||
|
"@babel/preset-react": "^7.22.5",
|
||||||
"@babel/register": "^7.12.13",
|
"@babel/register": "^7.12.13",
|
||||||
"@babel/runtime": "^7.12.13",
|
"@babel/runtime": "^7.12.13",
|
||||||
"babel-jest": "^24.9.0",
|
"babel-jest": "^29.6.2",
|
||||||
"babel-loader": "^9.1.3",
|
"babel-loader": "^9.1.3",
|
||||||
"copy-webpack-plugin": "^11.0.0",
|
"copy-webpack-plugin": "^11.0.0",
|
||||||
"css-loader": "^6.8.1",
|
"css-loader": "^6.8.1",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue