mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
2f81bd504c
* mock default overrides in test setup * change beforeEach to beforeALl * move some more enums into the enums directory * replace modules that import i18n into overrides with modules that don't * add pre tests and update vitest configs, scripts * replace tabs with spaces * fix vitest server port overlap warning * add missing overrides and clean up workspace config * change test name * include spec files in main test suite
30 lines
617 B
TypeScript
30 lines
617 B
TypeScript
import { defineConfig } from 'vite';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export const defaultConfig = {
|
|
plugins: [tsconfigPaths() as any],
|
|
clearScreen: false,
|
|
build: {
|
|
minify: 'esbuild' as const,
|
|
sourcemap: false,
|
|
},
|
|
rollupOptions: {
|
|
onwarn(warning, warn) {
|
|
// Suppress "Module level directives cause errors when bundled" warnings
|
|
if (warning.code === "MODULE_LEVEL_DIRECTIVE") {
|
|
return;
|
|
}
|
|
warn(warning);
|
|
},
|
|
}
|
|
};
|
|
|
|
|
|
export default defineConfig(({mode}) => ({
|
|
...defaultConfig,
|
|
esbuild: {
|
|
pure: mode === 'production' ? [ 'console.log' ] : [],
|
|
keepNames: true,
|
|
},
|
|
}));
|