mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
refactor: try faster docusaurus build (#3263)
* refactor: try esbuild-loader time * refactor: try swc-loader time * refactor: try switch minifiers and disable cache * refactor: try switch minifiers and compress cache * refactor: try switch minifiers and disable cache with swc * refactor: change back to switch minifiers and disable cache with esbuild * chore(deps): update caniuse-lite
This commit is contained in:
@@ -22,6 +22,17 @@ const config = {
|
||||
deploymentBranch: 'gh-pages',
|
||||
trailingSlash: false,
|
||||
|
||||
webpack: {
|
||||
jsLoader: isServer => ({
|
||||
loader: require.resolve('esbuild-loader'),
|
||||
options: {
|
||||
loader: 'tsx',
|
||||
format: isServer ? 'cjs' : undefined,
|
||||
target: isServer ? 'node12' : 'es2017',
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
@@ -146,6 +157,7 @@ const config = {
|
||||
searchResultContextMaxLength: 50,
|
||||
},
|
||||
],
|
||||
'./webpack-docusaurus-plugin',
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Generated
-16379
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,8 @@
|
||||
"@tsconfig/docusaurus": "^2.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.13.2",
|
||||
"@typescript-eslint/parser": "^6.13.2",
|
||||
"esbuild": "^0.19.8",
|
||||
"esbuild-loader": "^4.0.2",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-standard-with-typescript": "^40.0.0",
|
||||
@@ -45,6 +47,7 @@
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"eslint-plugin-react": "^7.33.2",
|
||||
"prettier": "^3.1.0",
|
||||
"terser-webpack-plugin": "^5.3.9",
|
||||
"typescript": "5.3.2"
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Credit: mattrunyon
|
||||
* https://github.com/facebook/docusaurus/issues/4765#issuecomment-1679863984
|
||||
*/
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin')
|
||||
|
||||
module.exports = function (context, options) {
|
||||
return {
|
||||
name: 'webpack-docusaurus-plugin',
|
||||
configureWebpack(config, isServer, utils) {
|
||||
const cacheOptions = { cache: false }
|
||||
|
||||
const minimizer = new TerserPlugin({
|
||||
minify: TerserPlugin.esbuildMinify,
|
||||
})
|
||||
const minimizers = config.optimization.minimizer?.map(m =>
|
||||
m instanceof TerserPlugin ? minimizer : m,
|
||||
)
|
||||
|
||||
return {
|
||||
mergeStrategy: { 'optimization.minimizer': 'replace' },
|
||||
optimization: {
|
||||
minimizer: minimizers,
|
||||
},
|
||||
...cacheOptions,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
+271
-13
@@ -3626,6 +3626,160 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/android-arm64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/android-arm64@npm:0.19.8"
|
||||
conditions: os=android & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/android-arm@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/android-arm@npm:0.19.8"
|
||||
conditions: os=android & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/android-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/android-x64@npm:0.19.8"
|
||||
conditions: os=android & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/darwin-arm64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/darwin-arm64@npm:0.19.8"
|
||||
conditions: os=darwin & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/darwin-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/darwin-x64@npm:0.19.8"
|
||||
conditions: os=darwin & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/freebsd-arm64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/freebsd-arm64@npm:0.19.8"
|
||||
conditions: os=freebsd & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/freebsd-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/freebsd-x64@npm:0.19.8"
|
||||
conditions: os=freebsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-arm64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-arm64@npm:0.19.8"
|
||||
conditions: os=linux & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-arm@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-arm@npm:0.19.8"
|
||||
conditions: os=linux & cpu=arm
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-ia32@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-ia32@npm:0.19.8"
|
||||
conditions: os=linux & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-loong64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-loong64@npm:0.19.8"
|
||||
conditions: os=linux & cpu=loong64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-mips64el@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-mips64el@npm:0.19.8"
|
||||
conditions: os=linux & cpu=mips64el
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-ppc64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-ppc64@npm:0.19.8"
|
||||
conditions: os=linux & cpu=ppc64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-riscv64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-riscv64@npm:0.19.8"
|
||||
conditions: os=linux & cpu=riscv64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-s390x@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-s390x@npm:0.19.8"
|
||||
conditions: os=linux & cpu=s390x
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/linux-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/linux-x64@npm:0.19.8"
|
||||
conditions: os=linux & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/netbsd-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/netbsd-x64@npm:0.19.8"
|
||||
conditions: os=netbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/openbsd-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/openbsd-x64@npm:0.19.8"
|
||||
conditions: os=openbsd & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/sunos-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/sunos-x64@npm:0.19.8"
|
||||
conditions: os=sunos & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-arm64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/win32-arm64@npm:0.19.8"
|
||||
conditions: os=win32 & cpu=arm64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-ia32@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/win32-ia32@npm:0.19.8"
|
||||
conditions: os=win32 & cpu=ia32
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@esbuild/win32-x64@npm:0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "@esbuild/win32-x64@npm:0.19.8"
|
||||
conditions: os=win32 & cpu=x64
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@eslint-community/eslint-utils@npm:^4.1.2, @eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0":
|
||||
version: 4.4.0
|
||||
resolution: "@eslint-community/eslint-utils@npm:4.4.0"
|
||||
@@ -6006,17 +6160,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001449, caniuse-lite@npm:^1.0.30001464":
|
||||
version: 1.0.30001476
|
||||
resolution: "caniuse-lite@npm:1.0.30001476"
|
||||
checksum: 21d10092473b1102ac013b7a38e97644fed2c93e4b6b4122540223592210add55f7499f11f81bc541691d1048155ab3359ecab7e7678d500e604c1bb243e2fc5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"caniuse-lite@npm:^1.0.30001538, caniuse-lite@npm:^1.0.30001541":
|
||||
version: 1.0.30001565
|
||||
resolution: "caniuse-lite@npm:1.0.30001565"
|
||||
checksum: abc58bf3504508c4cb62f0e4a3267a222140935cb63ff252f1e960bf8680cc17368da1d29fb1f68343dfa8b046de7b9e7c2003b822732adc4c68e8ab6ae82c0e
|
||||
"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001449, caniuse-lite@npm:^1.0.30001464, caniuse-lite@npm:^1.0.30001538, caniuse-lite@npm:^1.0.30001541":
|
||||
version: 1.0.30001566
|
||||
resolution: "caniuse-lite@npm:1.0.30001566"
|
||||
checksum: fdff43ed498201bf4f6074bd1112bd853e91973b6ccb016049b030948a7d197cba235ac4d93e712d1862b33a3c947bf4e62bad7011ccdac78e5179501b28d04a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7472,6 +7619,97 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild-loader@npm:^4.0.2":
|
||||
version: 4.0.2
|
||||
resolution: "esbuild-loader@npm:4.0.2"
|
||||
dependencies:
|
||||
esbuild: "npm:^0.19.0"
|
||||
get-tsconfig: "npm:^4.7.0"
|
||||
loader-utils: "npm:^2.0.4"
|
||||
webpack-sources: "npm:^1.4.3"
|
||||
peerDependencies:
|
||||
webpack: ^4.40.0 || ^5.0.0
|
||||
checksum: 0e7d4e4b7621aba963944f8c141191ed26f10931b384ba9dbf7433f88c5f167e2af527ff6c3fb5cae25c461ce040484457ba14e275e3349970f00692a5125e38
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"esbuild@npm:^0.19.0, esbuild@npm:^0.19.8":
|
||||
version: 0.19.8
|
||||
resolution: "esbuild@npm:0.19.8"
|
||||
dependencies:
|
||||
"@esbuild/android-arm": "npm:0.19.8"
|
||||
"@esbuild/android-arm64": "npm:0.19.8"
|
||||
"@esbuild/android-x64": "npm:0.19.8"
|
||||
"@esbuild/darwin-arm64": "npm:0.19.8"
|
||||
"@esbuild/darwin-x64": "npm:0.19.8"
|
||||
"@esbuild/freebsd-arm64": "npm:0.19.8"
|
||||
"@esbuild/freebsd-x64": "npm:0.19.8"
|
||||
"@esbuild/linux-arm": "npm:0.19.8"
|
||||
"@esbuild/linux-arm64": "npm:0.19.8"
|
||||
"@esbuild/linux-ia32": "npm:0.19.8"
|
||||
"@esbuild/linux-loong64": "npm:0.19.8"
|
||||
"@esbuild/linux-mips64el": "npm:0.19.8"
|
||||
"@esbuild/linux-ppc64": "npm:0.19.8"
|
||||
"@esbuild/linux-riscv64": "npm:0.19.8"
|
||||
"@esbuild/linux-s390x": "npm:0.19.8"
|
||||
"@esbuild/linux-x64": "npm:0.19.8"
|
||||
"@esbuild/netbsd-x64": "npm:0.19.8"
|
||||
"@esbuild/openbsd-x64": "npm:0.19.8"
|
||||
"@esbuild/sunos-x64": "npm:0.19.8"
|
||||
"@esbuild/win32-arm64": "npm:0.19.8"
|
||||
"@esbuild/win32-ia32": "npm:0.19.8"
|
||||
"@esbuild/win32-x64": "npm:0.19.8"
|
||||
dependenciesMeta:
|
||||
"@esbuild/android-arm":
|
||||
optional: true
|
||||
"@esbuild/android-arm64":
|
||||
optional: true
|
||||
"@esbuild/android-x64":
|
||||
optional: true
|
||||
"@esbuild/darwin-arm64":
|
||||
optional: true
|
||||
"@esbuild/darwin-x64":
|
||||
optional: true
|
||||
"@esbuild/freebsd-arm64":
|
||||
optional: true
|
||||
"@esbuild/freebsd-x64":
|
||||
optional: true
|
||||
"@esbuild/linux-arm":
|
||||
optional: true
|
||||
"@esbuild/linux-arm64":
|
||||
optional: true
|
||||
"@esbuild/linux-ia32":
|
||||
optional: true
|
||||
"@esbuild/linux-loong64":
|
||||
optional: true
|
||||
"@esbuild/linux-mips64el":
|
||||
optional: true
|
||||
"@esbuild/linux-ppc64":
|
||||
optional: true
|
||||
"@esbuild/linux-riscv64":
|
||||
optional: true
|
||||
"@esbuild/linux-s390x":
|
||||
optional: true
|
||||
"@esbuild/linux-x64":
|
||||
optional: true
|
||||
"@esbuild/netbsd-x64":
|
||||
optional: true
|
||||
"@esbuild/openbsd-x64":
|
||||
optional: true
|
||||
"@esbuild/sunos-x64":
|
||||
optional: true
|
||||
"@esbuild/win32-arm64":
|
||||
optional: true
|
||||
"@esbuild/win32-ia32":
|
||||
optional: true
|
||||
"@esbuild/win32-x64":
|
||||
optional: true
|
||||
bin:
|
||||
esbuild: bin/esbuild
|
||||
checksum: 8c440db4689948626dbc4122a03575c378e86e630e5de3789464504cd474bf3a1fd7c9402ed79eb8aa2f83e5cfd75872c8607d6255a05e540065b42750e89afe
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"escalade@npm:^3.1.1":
|
||||
version: 3.1.1
|
||||
resolution: "escalade@npm:3.1.1"
|
||||
@@ -10175,7 +10413,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"loader-utils@npm:^2.0.0":
|
||||
"loader-utils@npm:^2.0.0, loader-utils@npm:^2.0.4":
|
||||
version: 2.0.4
|
||||
resolution: "loader-utils@npm:2.0.4"
|
||||
dependencies:
|
||||
@@ -13928,6 +14166,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"source-list-map@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "source-list-map@npm:2.0.1"
|
||||
checksum: 3918ffba5fe8447bc816800026fe707aab233d9d05a3487225d880e23b7e37ed455b4e1b844e05644f6ecc7c9b837c0cc32da54dd37f77c993370ebcdb049246
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"source-map-js@npm:^1.0.2":
|
||||
version: 1.0.2
|
||||
resolution: "source-map-js@npm:1.0.2"
|
||||
@@ -13945,7 +14190,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0":
|
||||
"source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.0, source-map@npm:~0.6.1":
|
||||
version: 0.6.1
|
||||
resolution: "source-map@npm:0.6.1"
|
||||
checksum: 59ef7462f1c29d502b3057e822cdbdae0b0e565302c4dd1a95e11e793d8d9d62006cdc10e0fd99163ca33ff2071360cf50ee13f90440806e7ed57d81cba2f7ff
|
||||
@@ -15123,6 +15368,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"webpack-sources@npm:^1.4.3":
|
||||
version: 1.4.3
|
||||
resolution: "webpack-sources@npm:1.4.3"
|
||||
dependencies:
|
||||
source-list-map: "npm:^2.0.0"
|
||||
source-map: "npm:~0.6.1"
|
||||
checksum: 6237c5d1ba639a5d67bd1135c9bba487eadbd04c5e75a2849508013f13cb4b57387e689e0991c19a14a87085be7cc0b8dd1515422ae351f6e3f813ed100ccbb8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"webpack-sources@npm:^3.2.2, webpack-sources@npm:^3.2.3":
|
||||
version: 3.2.3
|
||||
resolution: "webpack-sources@npm:3.2.3"
|
||||
@@ -15197,6 +15452,8 @@ __metadata:
|
||||
babel-plugin-styled-components: "npm:^2.1.4"
|
||||
chart.js: "npm:^4.4.1"
|
||||
clsx: "npm:^2.0.0"
|
||||
esbuild: "npm:^0.19.8"
|
||||
esbuild-loader: "npm:^4.0.2"
|
||||
eslint: "npm:^8.55.0"
|
||||
eslint-config-prettier: "npm:^9.1.0"
|
||||
eslint-config-standard-with-typescript: "npm:^40.0.0"
|
||||
@@ -15210,6 +15467,7 @@ __metadata:
|
||||
react-chartjs-2: "npm:^5.2.0"
|
||||
react-dom: "npm:^18.2.0"
|
||||
styled-components: "npm:^6.1.1"
|
||||
terser-webpack-plugin: "npm:^5.3.9"
|
||||
typescript: "npm:5.3.2"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
Reference in New Issue
Block a user