mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: upgrade packages and hash size
This commit is contained in:
1 parent
4bf16b2784
commit
0cf108d534
4 files changed
+18
-21
No files matched your search
+5
-8
@@ -33,24 +33,24 @@
|
||||
"@types/autocannon": "^7.9.0",
|
||||
"@types/cross-spawn": "^6.0.2",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"@types/node": "^18.8.3",
|
||||
"@types/node": "^18.8.4",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.39.0",
|
||||
"@typescript-eslint/parser": "^5.39.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||
"@typescript-eslint/parser": "^5.40.0",
|
||||
"autocannon": "^7.10.0",
|
||||
"cac": "^6.7.14",
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-spawn": "^7.0.3",
|
||||
"esbuild": "0.15.2",
|
||||
"eslint": "^8.24.0",
|
||||
"eslint": "^8.25.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-import-resolver-typescript": "^3.5.1",
|
||||
"eslint-import-resolver-webpack": "^0.13.2",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||
"eslint-plugin-react": "^7.31.8",
|
||||
"eslint-plugin-react": "^7.31.10",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-simple-import-sort": "8.0.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
@@ -65,8 +65,5 @@
|
||||
"supertest": "^6.3.0",
|
||||
"typescript": "4.8.4"
|
||||
},
|
||||
"resolutions": {
|
||||
"@blueprintjs/icons": "4.6.0"
|
||||
},
|
||||
"packageManager": "yarn@3.2.3"
|
||||
}
|
||||
@@ -91,8 +91,8 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
hashFunction: 'sha1',
|
||||
hashDigest: 'hex',
|
||||
hashDigestLength: 10,
|
||||
filename: '[name].js?[contenthash:4]',
|
||||
chunkFilename: '[name].[chunkhash:4].chunk.js',
|
||||
filename: '[name].js?[contenthash:6]',
|
||||
chunkFilename: '[name].[chunkhash:6].chunk.js',
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.cjs'],
|
||||
@@ -130,15 +130,15 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
const extra = p.split('node_modules')[1];
|
||||
const moduleName = extra.split('/')[0];
|
||||
if (extra.includes('@fontsource')) {
|
||||
return `fonts/${filename}?[hash:4]`;
|
||||
return `fonts/${filename}?[hash:6]`;
|
||||
}
|
||||
if (['katex', 'monaco-editor'].includes(moduleName)) {
|
||||
return `modules/${moduleName}/${filename}?[hash:4]`;
|
||||
return `modules/${moduleName}/${filename}?[hash:6]`;
|
||||
}
|
||||
return `modules/${extra.substr(1)}?[hash:4]`;
|
||||
return `modules/${extra.substr(1)}?[hash:6]`;
|
||||
}
|
||||
if (p.includes('.iconfont')) return `${filename}?[hash:4]`;
|
||||
return `${p.split('ui-default')[1].substring(1)}?[hash:4]`;
|
||||
if (p.includes('.iconfont')) return `${filename}?[hash:6]`;
|
||||
return `${p.split('ui-default')[1].substring(1)}?[hash:6]`;
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -238,7 +238,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
monaco: 'monaco-editor/esm/vs/editor/editor.api',
|
||||
}),
|
||||
new ExtractCssPlugin({
|
||||
filename: '[name].css?[fullhash:4]',
|
||||
filename: '[name].css?[fullhash:6]',
|
||||
}),
|
||||
new FriendlyErrorsPlugin(),
|
||||
new webpack.IgnorePlugin({ resourceRegExp: /(^\.\/locale$|mathjax|abcjs)/ }),
|
||||
@@ -257,7 +257,7 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
}),
|
||||
new webpack.NormalModuleReplacementPlugin(/\/(vscode-)?nls\.js/, require.resolve('../../components/monaco/nls')),
|
||||
new MonacoWebpackPlugin({
|
||||
filename: '[name].[hash:4].worker.js',
|
||||
filename: '[name].[hash:6].worker.js',
|
||||
customLanguages: [{
|
||||
label: 'yaml',
|
||||
entry: require.resolve('monaco-yaml/index.js'),
|
||||
|
||||
@@ -57,8 +57,8 @@ async function runWebpack({
|
||||
if (!file.isFile() || file.name.endsWith('.map')) continue;
|
||||
const data = await fs.stat(path.join(root('public'), file.name));
|
||||
const key = file.name
|
||||
.replace(/\.[a-f0-9]{4}\.chunk\./, '.chunk.')
|
||||
.replace(/\.[a-f0-9]{4}\.worker\./, '.worker.');
|
||||
.replace(/\.[a-f0-9]{6}\.chunk\./, '.chunk.')
|
||||
.replace(/\.[a-f0-9]{6}\.worker\./, '.worker.');
|
||||
stats[key] = data.size;
|
||||
}
|
||||
const statsPath = root('__bundleInfo');
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
"lint": "eslint"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blueprintjs/core": "4.11.2",
|
||||
"@blueprintjs/select": "4.8.2",
|
||||
"@blueprintjs/core": "4.11.3",
|
||||
"@blueprintjs/select": "4.8.3",
|
||||
"@fontsource/dm-mono": "^4.5.10",
|
||||
"@fontsource/fira-code": "^4.5.12",
|
||||
"@fontsource/inconsolata": "^4.5.8",
|
||||
|
||||
Reference in new issue
Block a user