ui: use common upload function

This commit is contained in:
undefined committed 2022-08-24 16:42:18 +08:00
1 parent b48dc5344a
commit 803c3f4925
8 files changed
+113 -260

No files matched your search

+4 -1
View File
@@ -56,7 +56,10 @@ async function runWebpack({
for (const file of files) {
if (!file.isFile() || file.name.endsWith('.map')) continue;
const data = await fs.stat(path.join(root('public'), file.name));
stats[file.name.replace(/\.[a-f0-9]{10}\./, '.')] = data.size;
const key = file.name
.replace(/\.[a-f0-9]{4}\.chunk\./, '.chunk.')
.replace(/\.[a-f0-9]{4}\.worker\./, '.worker.');
stats[key] = data.size;
}
const statsPath = root('__bundleInfo');
if (fs.existsSync(statsPath)) {