mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-30 10:48:05 +02:00
chore: upgrade Webpack to 5.95 and related deps (#10548)
This commit is contained in:
parent
5de4832fb2
commit
05f3c203a2
9 changed files with 45 additions and 41 deletions
|
@ -41,7 +41,7 @@
|
||||||
"terser-webpack-plugin": "^5.3.9",
|
"terser-webpack-plugin": "^5.3.9",
|
||||||
"tslib": "^2.6.0",
|
"tslib": "^2.6.0",
|
||||||
"url-loader": "^4.1.1",
|
"url-loader": "^4.1.1",
|
||||||
"webpack": "^5.88.1",
|
"webpack": "^5.95.0",
|
||||||
"webpackbar": "^6.0.1"
|
"webpackbar": "^6.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"core-js": "^3.31.1",
|
"core-js": "^3.31.1",
|
||||||
"tslib": "^2.6.0",
|
"tslib": "^2.6.0",
|
||||||
"webpack": "^5.88.1",
|
"webpack": "^5.95.0",
|
||||||
"webpack-merge": "^5.9.0",
|
"webpack-merge": "^5.9.0",
|
||||||
"workbox-build": "^7.0.0",
|
"workbox-build": "^7.0.0",
|
||||||
"workbox-precaching": "^7.0.0",
|
"workbox-precaching": "^7.0.0",
|
||||||
|
|
|
@ -94,20 +94,15 @@ export default function pluginPWA(
|
||||||
configureWebpack(config, isServer, {currentBundler}) {
|
configureWebpack(config, isServer, {currentBundler}) {
|
||||||
return {
|
return {
|
||||||
plugins: [
|
plugins: [
|
||||||
new currentBundler.instance.EnvironmentPlugin(
|
new currentBundler.instance.EnvironmentPlugin({
|
||||||
// See https://github.com/facebook/docusaurus/pull/10455#issuecomment-2317593528
|
PWA_DEBUG: debug,
|
||||||
// See https://github.com/webpack/webpack/commit/adf2a6b7c6077fd806ea0e378c1450cccecc9ed0#r145989788
|
PWA_SERVICE_WORKER_URL: path.posix.resolve(
|
||||||
// @ts-expect-error: bad Webpack type?
|
`${(config.output?.publicPath as string) || '/'}`,
|
||||||
{
|
'sw.js',
|
||||||
PWA_DEBUG: debug,
|
),
|
||||||
PWA_SERVICE_WORKER_URL: path.posix.resolve(
|
PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES:
|
||||||
`${(config.output?.publicPath as string) || '/'}`,
|
offlineModeActivationStrategies,
|
||||||
'sw.js',
|
}),
|
||||||
),
|
|
||||||
PWA_OFFLINE_MODE_ACTIVATION_STRATEGIES:
|
|
||||||
offlineModeActivationStrategies,
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"joi": "^17.9.2",
|
"joi": "^17.9.2",
|
||||||
"react-helmet-async": "^1.3.0",
|
"react-helmet-async": "^1.3.0",
|
||||||
"utility-types": "^3.10.0",
|
"utility-types": "^3.10.0",
|
||||||
"webpack": "^5.88.1",
|
"webpack": "^5.95.0",
|
||||||
"webpack-merge": "^5.9.0"
|
"webpack-merge": "^5.9.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
|
|
|
@ -73,10 +73,10 @@
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"tslib": "^2.6.0",
|
"tslib": "^2.6.0",
|
||||||
"update-notifier": "^6.0.2",
|
"update-notifier": "^6.0.2",
|
||||||
"webpack": "^5.88.1",
|
"webpack": "^5.95.0",
|
||||||
"webpack-bundle-analyzer": "^4.9.0",
|
"webpack-bundle-analyzer": "^4.10.2",
|
||||||
"webpack-dev-server": "^4.15.1",
|
"webpack-dev-server": "^4.15.2",
|
||||||
"webpack-merge": "^5.9.0"
|
"webpack-merge": "^6.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "3.5.2",
|
"@docusaurus/module-type-aliases": "3.5.2",
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
"@types/rtl-detect": "^1.0.0",
|
"@types/rtl-detect": "^1.0.0",
|
||||||
"@types/serve-handler": "^6.1.4",
|
"@types/serve-handler": "^6.1.4",
|
||||||
"@types/update-notifier": "^6.0.4",
|
"@types/update-notifier": "^6.0.4",
|
||||||
"@types/webpack-bundle-analyzer": "^4.6.0",
|
"@types/webpack-bundle-analyzer": "^4.7.0",
|
||||||
"react-test-renderer": "^18.0.0",
|
"react-test-renderer": "^18.0.0",
|
||||||
"tmp-promise": "^3.0.3",
|
"tmp-promise": "^3.0.3",
|
||||||
"tree-node-cli": "^1.6.0"
|
"tree-node-cli": "^1.6.0"
|
||||||
|
|
|
@ -172,7 +172,7 @@ export async function createBuildClientConfig({
|
||||||
new ReactLoadableSSRAddon({
|
new ReactLoadableSSRAddon({
|
||||||
filename: clientManifestPath,
|
filename: clientManifestPath,
|
||||||
}),
|
}),
|
||||||
].filter(<T>(x: T | undefined | false): x is T => Boolean(x)),
|
],
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ export default async function createServerConfig({
|
||||||
name: 'Server',
|
name: 'Server',
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
}),
|
}),
|
||||||
].filter(Boolean),
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
return {config, serverBundlePath};
|
return {config, serverBundlePath};
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
"rehype-katex": "^7.0.0",
|
"rehype-katex": "^7.0.0",
|
||||||
"remark-math": "^6.0.0",
|
"remark-math": "^6.0.0",
|
||||||
"unist-util-visit": "^5.0.0",
|
"unist-util-visit": "^5.0.0",
|
||||||
"webpack": "^5.88.1",
|
"webpack": "^5.95.0",
|
||||||
"workbox-routing": "^7.0.0",
|
"workbox-routing": "^7.0.0",
|
||||||
"workbox-strategies": "^7.0.0"
|
"workbox-strategies": "^7.0.0"
|
||||||
},
|
},
|
||||||
|
|
41
yarn.lock
41
yarn.lock
|
@ -3860,10 +3860,10 @@
|
||||||
"@types/configstore" "*"
|
"@types/configstore" "*"
|
||||||
boxen "^7.0.0"
|
boxen "^7.0.0"
|
||||||
|
|
||||||
"@types/webpack-bundle-analyzer@^4.6.0":
|
"@types/webpack-bundle-analyzer@^4.7.0":
|
||||||
version "4.6.0"
|
version "4.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.6.0.tgz#8863d62d2432126c2b3a9239cafa469215981c24"
|
resolved "https://registry.yarnpkg.com/@types/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.7.0.tgz#fe199e724ce3d38705f6f1ba4d62429b7c360541"
|
||||||
integrity sha512-XeQmQCCXdZdap+A/60UKmxW5Mz31Vp9uieGlHB3T4z/o2OLVLtTI3bvTuS6A2OWd/rbAAQiGGWIEFQACu16szA==
|
integrity sha512-c5i2ThslSNSG8W891BRvOd/RoCjI2zwph8maD22b1adtSns20j+0azDDMCK06DiVrzTgnwiDl5Ntmu1YRJw8Sg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
tapable "^2.2.0"
|
tapable "^2.2.0"
|
||||||
|
@ -17117,7 +17117,7 @@ webidl-conversions@^7.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
|
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
|
||||||
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
|
integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==
|
||||||
|
|
||||||
webpack-bundle-analyzer@^4.10.2, webpack-bundle-analyzer@^4.9.0:
|
webpack-bundle-analyzer@^4.10.2:
|
||||||
version "4.10.2"
|
version "4.10.2"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd"
|
resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.10.2.tgz#633af2862c213730be3dbdf40456db171b60d5bd"
|
||||||
integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==
|
integrity sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==
|
||||||
|
@ -17135,7 +17135,7 @@ webpack-bundle-analyzer@^4.10.2, webpack-bundle-analyzer@^4.9.0:
|
||||||
sirv "^2.0.3"
|
sirv "^2.0.3"
|
||||||
ws "^7.3.1"
|
ws "^7.3.1"
|
||||||
|
|
||||||
webpack-dev-middleware@^5.3.1:
|
webpack-dev-middleware@^5.3.4:
|
||||||
version "5.3.4"
|
version "5.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517"
|
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-5.3.4.tgz#eb7b39281cbce10e104eb2b8bf2b63fce49a3517"
|
||||||
integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==
|
integrity sha512-BVdTqhhs+0IfoeAf7EoH5WE+exCmqGerHfDM0IL096Px60Tq2Mn9MAbnaGUe6HiMa41KMCYF19gyzZmBcq/o4Q==
|
||||||
|
@ -17146,10 +17146,10 @@ webpack-dev-middleware@^5.3.1:
|
||||||
range-parser "^1.2.1"
|
range-parser "^1.2.1"
|
||||||
schema-utils "^4.0.0"
|
schema-utils "^4.0.0"
|
||||||
|
|
||||||
webpack-dev-server@^4.15.1:
|
webpack-dev-server@^4.15.2:
|
||||||
version "4.15.1"
|
version "4.15.2"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.1.tgz#8944b29c12760b3a45bdaa70799b17cb91b03df7"
|
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.15.2.tgz#9e0c70a42a012560860adb186986da1248333173"
|
||||||
integrity sha512-5hbAst3h3C3L8w6W4P96L5vaV0PxSmJhxZvWKYIdgxOQm8pNZ5dEOmmSLBVpP85ReeyRt6AS1QJNyo/oFFPeVA==
|
integrity sha512-0XavAZbNJ5sDrCbkpWL8mia0o5WPOd2YGtxrEiZkBK9FjLppIUK2TgxK6qGD2P3hUXTJNNPVibrerKcx5WkR1g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/bonjour" "^3.5.9"
|
"@types/bonjour" "^3.5.9"
|
||||||
"@types/connect-history-api-fallback" "^1.3.5"
|
"@types/connect-history-api-fallback" "^1.3.5"
|
||||||
|
@ -17179,7 +17179,7 @@ webpack-dev-server@^4.15.1:
|
||||||
serve-index "^1.9.1"
|
serve-index "^1.9.1"
|
||||||
sockjs "^0.3.24"
|
sockjs "^0.3.24"
|
||||||
spdy "^4.0.2"
|
spdy "^4.0.2"
|
||||||
webpack-dev-middleware "^5.3.1"
|
webpack-dev-middleware "^5.3.4"
|
||||||
ws "^8.13.0"
|
ws "^8.13.0"
|
||||||
|
|
||||||
webpack-merge@^5.9.0:
|
webpack-merge@^5.9.0:
|
||||||
|
@ -17190,15 +17190,24 @@ webpack-merge@^5.9.0:
|
||||||
clone-deep "^4.0.1"
|
clone-deep "^4.0.1"
|
||||||
wildcard "^2.0.0"
|
wildcard "^2.0.0"
|
||||||
|
|
||||||
|
webpack-merge@^6.0.1:
|
||||||
|
version "6.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-6.0.1.tgz#50c776868e080574725abc5869bd6e4ef0a16c6a"
|
||||||
|
integrity sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==
|
||||||
|
dependencies:
|
||||||
|
clone-deep "^4.0.1"
|
||||||
|
flat "^5.0.2"
|
||||||
|
wildcard "^2.0.1"
|
||||||
|
|
||||||
webpack-sources@^3.2.3:
|
webpack-sources@^3.2.3:
|
||||||
version "3.2.3"
|
version "3.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
|
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
|
||||||
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
|
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
|
||||||
|
|
||||||
webpack@^5, webpack@^5.88.1:
|
webpack@^5, webpack@^5.88.1, webpack@^5.95.0:
|
||||||
version "5.94.0"
|
version "5.95.0"
|
||||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f"
|
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.95.0.tgz#8fd8c454fa60dad186fbe36c400a55848307b4c0"
|
||||||
integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==
|
integrity sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/estree" "^1.0.5"
|
"@types/estree" "^1.0.5"
|
||||||
"@webassemblyjs/ast" "^1.12.1"
|
"@webassemblyjs/ast" "^1.12.1"
|
||||||
|
@ -17347,7 +17356,7 @@ widest-line@^4.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
string-width "^5.0.1"
|
string-width "^5.0.1"
|
||||||
|
|
||||||
wildcard@^2.0.0:
|
wildcard@^2.0.0, wildcard@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
|
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
|
||||||
integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==
|
integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==
|
||||||
|
|
Loading…
Add table
Reference in a new issue