tweak vite config

This commit is contained in:
pa
2025-11-25 22:22:58 +09:00
committed by Natsumi
parent 5176447e69
commit 5090cedf38
3 changed files with 399 additions and 123 deletions

View File

@@ -19,7 +19,7 @@ if (buildAndUploadSourceMaps) {
console.log('Source maps will be built and uploaded to Sentry');
}
// https://vite.dev/config/
// @ts-ignore
export default defineConfig(() => ({
base: '',
plugins: [
@@ -37,21 +37,33 @@ export default defineConfig(() => ({
}
})
],
css: {
transformer: 'lightningcss',
lightningcss: {
minify: true,
targets: {
chrome: 135
}
}
},
define: {
LINUX: JSON.stringify(process.env.PLATFORM === 'linux'),
WINDOWS: JSON.stringify(process.env.PLATFORM === 'windows')
},
server: {
port: 9000
port: 9000,
strictPort: true
},
build: {
target: 'esnext',
outDir: '../build/html',
cssMinify: 'lightningcss',
license: true,
emptyOutDir: true,
copyPublicDir: false,
reportCompressedSize: false,
chunkSizeWarningLimit: 5000,
modulePreload: { polyfill: false },
modulePreload: true,
assetsInlineLimit: 0,
rollupOptions: {
input: {