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() {
|
function fileLoader() {
|
||||||
return {
|
return {
|
||||||
loader: 'file-loader',
|
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]';
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hydrooj/ui-default",
|
"name": "@hydrooj/ui-default",
|
||||||
"version": "4.6.5",
|
"version": "4.6.6",
|
||||||
"author": "undefined <i@undefined.moe>",
|
"author": "undefined <i@undefined.moe>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "hydro.js",
|
"main": "hydro.js",
|
||||||
|
|||||||
Reference in new issue
Block a user