mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix resource pack
This commit is contained in:
1 parent
e06279e26c
commit
37e71cf967
2 files changed
+10
-2
No files matched your search
@@ -46,7 +46,15 @@ export default function (env = {}) {
|
||||
function fileLoader() {
|
||||
return {
|
||||
loader: 'file-loader',
|
||||
options: { name: 'files/[name].[sha1:hash:hex:10].[ext]' },
|
||||
options: {
|
||||
name(resourcePath) {
|
||||
if (resourcePath.includes('node_modules')) {
|
||||
const extra = resourcePath.split('node_modules')[1];
|
||||
return `modules/${extra.substr(1, extra.length - 1)}?[contenthash]`;
|
||||
}
|
||||
return '[path][name].[ext]?[contenthash]';
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user