mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge&ui: optimize bundle size
This commit is contained in:
1 parent
e70b1f53ed
commit
265b14236a
4 files changed
+7
-5
No files matched your search
@@ -122,9 +122,9 @@ async function main() {
|
||||
fs.copyFileSync('public/default.theme.css', `public/default-${pkg.version}.theme.css`);
|
||||
}
|
||||
if (argv.options.production) {
|
||||
fs.removeSync('public/vditor/dist/js/echarts');
|
||||
fs.removeSync('public/vditor/dist/js/graphviz');
|
||||
fs.removeSync('public/vditor/dist/js/mermaid');
|
||||
for (const f of ['echarts', 'graphviz', 'mermaid', 'mathjax']) {
|
||||
fs.removeSync(`public/vditor/dist/js/${f}`);
|
||||
}
|
||||
const files = fs.readdirSync('public');
|
||||
files.filter((i) => /(^[in]\..+|worker)\.js\.map$/.test(i)).forEach((i) => fs.removeSync(`public/${i}`));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user