mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
ui: update resource loader
This commit is contained in:
1 parent
0726dba492
commit
258a677e4f
7 files changed
+34
-36
No files matched your search
@@ -190,9 +190,11 @@ export default function (env: { watch?: boolean, production?: boolean, measure?:
|
||||
automaticNameDelimiter: '-',
|
||||
cacheGroups: {
|
||||
style: {
|
||||
test: /\.(css|styl|less|s[ac]ss)$/,
|
||||
priority: 99,
|
||||
name: 'style',
|
||||
name: 'theme',
|
||||
type: 'css/mini-extract',
|
||||
chunks: 'all',
|
||||
enforce: true,
|
||||
},
|
||||
vendors: {
|
||||
test: /[\\/]node_modules[\\/].+\.([jt]sx?|json|yaml)$/,
|
||||
|
||||
@@ -120,8 +120,8 @@ async function main() {
|
||||
if (fs.existsSync('public/polyfill.js')) {
|
||||
fs.copyFileSync('public/polyfill.js', `public/polyfill-${pkg.version}.js`);
|
||||
}
|
||||
if (fs.existsSync('public/default.theme.css')) {
|
||||
fs.copyFileSync('public/default.theme.css', `public/default-${pkg.version}.theme.css`);
|
||||
if (fs.existsSync('public/theme.css')) {
|
||||
fs.copyFileSync('public/theme.css', `public/theme-${pkg.version}.css`);
|
||||
}
|
||||
if (argv.options.production) {
|
||||
for (const f of ['echarts', 'graphviz', 'mermaid', 'mathjax']) {
|
||||
|
||||
Reference in new issue
Block a user