You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
797 B
TypeScript
33 lines
797 B
TypeScript
import { defineConfig } from 'vite';
|
|
import path from 'path';
|
|
|
|
const rootDir = __dirname;
|
|
|
|
export default defineConfig({
|
|
root: rootDir,
|
|
base: '/town-editor/',
|
|
publicDir: path.resolve(rootDir, '../../frontend/public'),
|
|
resolve: {
|
|
alias: {
|
|
'@game': path.resolve(rootDir, '../../frontend/src/game'),
|
|
'@shared': path.resolve(rootDir, '../../frontend/src/shared'),
|
|
'@frontend': path.resolve(rootDir, '../../frontend/src'),
|
|
'pixi.js': path.resolve(rootDir, 'node_modules/pixi.js'),
|
|
},
|
|
dedupe: ['pixi.js'],
|
|
},
|
|
server: {
|
|
port: 5175,
|
|
fs: {
|
|
allow: [
|
|
path.resolve(rootDir, '../../frontend'),
|
|
path.resolve(rootDir, '../../admin-web/town-editor'),
|
|
],
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
},
|
|
});
|