mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 16:26:25 +00:00
728ee3809a
* add dependency cruiser and fix all default errors * create svg render of dependencies in command * move configs to ts files, await font loading * fix i18n * fix dependencies... * fix typedoc generation and tsconfig exclusions * revert github-pages fix for another pr * no-circular -> no-circular-at-runtime for type imports (future)
31 lines
659 B
TypeScript
31 lines
659 B
TypeScript
import { defineConfig } from 'vite';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export const defaultConfig = {
|
|
plugins: [tsconfigPaths() as any],
|
|
server: { host: '0.0.0.0', port: 8000 },
|
|
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,
|
|
},
|
|
}));
|