1
0
mirror of https://github.com/zumbiepig/MineXLauncher.git synced 2025-06-26 10:05:10 +00:00

yes i fixed it

This commit is contained in:
zumbiepig
2024-08-31 07:39:46 -07:00
parent 68909ee789
commit c465125c13
2 changed files with 18 additions and 16 deletions

View File

@@ -33,6 +33,7 @@ const srcFilesArr = getFiles(join(import.meta.dir, 'src'));
await build({
entrypoints: srcFilesArr,
outdir: './public/',
target: 'browser',
root: './src/',
minify: {
syntax: true,
@@ -48,9 +49,11 @@ console.log(chalk.cyan('Generating assets list...\n'));
const publicDir = join(import.meta.dir, 'public');
writeFileSync(
join(publicDir, 'assets.json'),
JSON.stringify(getFiles(publicDir))
.replace(new RegExp(`^${publicDir}`), '')
.replace(/\/index\.html$/, '/')
JSON.stringify(
getFiles(publicDir).map((asset) => {
return asset.replace(new RegExp(`^${publicDir}`), '').replace(/\/index\.html$/, '/');
})
)
);
console.log(chalk.green('Build complete!\n'));