mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-14 01:27:35 +02:00
refactor: remove Babel plugins that are included in preset-env (#6614)
This commit is contained in:
parent
93c5ad8742
commit
919f1600c2
6 changed files with 4 additions and 25 deletions
|
@ -18,10 +18,4 @@ module.exports = {
|
|||
'@babel/react',
|
||||
'@babel/preset-typescript',
|
||||
],
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
'@babel/plugin-proposal-object-rest-spread',
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -61,9 +61,6 @@
|
|||
"@babel/cli": "^7.16.0",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/eslint-parser": "^7.16.3",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@crowdin/cli": "^3.7.1",
|
||||
"@types/fs-extra": "^9.0.6",
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
||||
"@babel/preset-env": "^7.16.11",
|
||||
"@docusaurus/core": "2.0.0-beta.15",
|
||||
"@docusaurus/theme-common": "2.0.0-beta.15",
|
||||
|
|
|
@ -37,11 +37,6 @@ function getSWBabelLoader() {
|
|||
},
|
||||
],
|
||||
],
|
||||
plugins: [
|
||||
require.resolve('@babel/plugin-proposal-object-rest-spread'),
|
||||
require.resolve('@babel/plugin-proposal-optional-chaining'),
|
||||
require.resolve('@babel/plugin-proposal-nullish-coalescing-operator'),
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,14 +12,9 @@ module.exports = {
|
|||
// we mostly need to transpile some features so that node does not crash...
|
||||
lib: {
|
||||
presets: [
|
||||
['@babel/preset-env', {targets: {node: 14}, modules: 'commonjs'}],
|
||||
['@babel/preset-typescript', {isTSX: true, allExtensions: true}],
|
||||
],
|
||||
// Useful to transpile for older node versions
|
||||
plugins: [
|
||||
'@babel/plugin-transform-modules-commonjs',
|
||||
'@babel/plugin-proposal-nullish-coalescing-operator',
|
||||
'@babel/plugin-proposal-optional-chaining',
|
||||
],
|
||||
},
|
||||
|
||||
// USED FOR JS SWIZZLE
|
||||
|
|
|
@ -533,7 +533,7 @@
|
|||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
"@babel/plugin-syntax-logical-assignment-operators" "^7.10.4"
|
||||
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7":
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator@^7.13.8", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99"
|
||||
integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==
|
||||
|
@ -577,7 +577,7 @@
|
|||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
"@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
|
||||
|
||||
"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.16.0", "@babel/plugin-proposal-optional-chaining@^7.16.7":
|
||||
"@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a"
|
||||
integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==
|
||||
|
@ -880,7 +880,7 @@
|
|||
"@babel/helper-plugin-utils" "^7.16.7"
|
||||
babel-plugin-dynamic-import-node "^2.3.3"
|
||||
|
||||
"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.16.0", "@babel/plugin-transform-modules-commonjs@^7.16.8":
|
||||
"@babel/plugin-transform-modules-commonjs@^7.13.8", "@babel/plugin-transform-modules-commonjs@^7.16.8":
|
||||
version "7.16.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz#cdee19aae887b16b9d331009aa9a219af7c86afe"
|
||||
integrity sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA==
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue