fix: build

This commit is contained in:
手瓜一十雪 2024-11-16 11:37:47 +08:00
parent 046afc0c23
commit e34b60315c

View File

@ -63,19 +63,19 @@ const ShellBaseConfig = () =>
'./lib-cov/fluent-ffmpeg': './lib/fluent-ffmpeg', './lib-cov/fluent-ffmpeg': './lib/fluent-ffmpeg',
}, },
}, },
}, build: {
build: { sourcemap: false,
sourcemap: false, target: 'esnext',
target: 'esnext', minify: false,
minify: false, lib: {
lib: { entry: {
entry: { 'napcat': 'src/shell/napcat.ts',
'napcat': 'src/shell/napcat.ts', 'audio-worker': 'src/common/audio-worker.ts',
'audio-worker': 'src/common/audio-worker.ts', },
}, formats: ['es'],
formats: ['es'], fileName: (_, entryName) => `${entryName}.mjs`,
fileName: (_, entryName) => `${entryName}.mjs`, }
}, }
}); });
const FrameworkBaseConfig = () => const FrameworkBaseConfig = () =>
@ -88,19 +88,19 @@ const FrameworkBaseConfig = () =>
'./lib-cov/fluent-ffmpeg': './lib/fluent-ffmpeg', './lib-cov/fluent-ffmpeg': './lib/fluent-ffmpeg',
}, },
}, },
}, build: {
build: { sourcemap: false,
sourcemap: false, target: 'esnext',
target: 'esnext', minify: false,
minify: false, lib: {
lib: { entry: {
entry: { 'napcat': 'src/framework/napcat.ts',
'napcat': 'src/framework/napcat.ts', 'audio-worker': 'src/common/audio-worker.ts',
'audio-worker': 'src/common/audio-worker.ts', },
formats: ['es'],
fileName: (_, entryName) => `${entryName}.mjs`,
}, },
formats: ['es'], }
fileName: (_, entryName) => `${entryName}.mjs`,
},
}); });
export default defineConfig(({ mode }): UserConfig => { export default defineConfig(({ mode }): UserConfig => {