ui: fix resource pack

This commit is contained in:
undefined committed 2021-04-19 22:14:14 +08:00
1 parent e06279e26c
commit 37e71cf967
2 files changed
+10 -2

No files matched your search

+9 -1
View File
@@ -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]';
},
},
};
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.6.5",
"version": "4.6.6",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",