49 lines
No EOL
1.3 KiB
JavaScript
49 lines
No EOL
1.3 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'path';
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, 'src'),
|
|
'@components': path.resolve(__dirname, 'src/components'),
|
|
'@features': path.resolve(__dirname, 'src/features'),
|
|
'@hooks': path.resolve(__dirname, 'src/hooks'),
|
|
'@layouts': path.resolve(__dirname, 'src/layouts'),
|
|
'@pages': path.resolve(__dirname, 'src/pages'),
|
|
'@services': path.resolve(__dirname, 'src/services'),
|
|
'@store': path.resolve(__dirname, 'src/store'),
|
|
'@theme': path.resolve(__dirname, 'src/theme'),
|
|
'@utils': path.resolve(__dirname, 'src/utils'),
|
|
'@assets': path.resolve(__dirname, 'src/assets')
|
|
}
|
|
},
|
|
server: {
|
|
// port: 3000,
|
|
// proxy: {
|
|
// '/api': {
|
|
// target: 'http://localhost:4000',
|
|
// changeOrigin: true,
|
|
// secure: false
|
|
// }
|
|
// },
|
|
allowedHosts: ['localhost', 'rocks.2many.ca'],
|
|
host: '0.0.0.0',
|
|
port: 3000,
|
|
watch: {
|
|
usePolling: true,
|
|
},
|
|
hmr: {
|
|
clientPort: 3000,
|
|
host: 'localhost',
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
assetsDir: 'assets',
|
|
emptyOutDir: true,
|
|
sourcemap: process.env.NODE_ENV !== 'production'
|
|
}
|
|
}); |