44 lines
1.3 KiB
TypeScript
44 lines
1.3 KiB
TypeScript
import path from 'node:path'
|
|
import VuePlugin from '@vitejs/plugin-vue'
|
|
import { defineConfig } from 'vite'
|
|
import VueRouterPlugin from 'vue-router/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
VueRouterPlugin(),
|
|
VuePlugin(),
|
|
],
|
|
resolve: {
|
|
alias: [
|
|
{ find: '@app', replacement: path.resolve(__dirname, './src/app') },
|
|
{ find: '@pages', replacement: path.resolve(__dirname, './src/pages') },
|
|
{ find: '@widgets', replacement: path.resolve(__dirname, './src/widgets') },
|
|
{ find: '@features', replacement: path.resolve(__dirname, './src/features') },
|
|
{ find: '@entites', replacement: path.resolve(__dirname, './src/entites') },
|
|
{ find: '@shared', replacement: path.resolve(__dirname, './src/shared') },
|
|
{ find: '@', replacement: path.resolve(__dirname, './src') },
|
|
],
|
|
},
|
|
css: {
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `
|
|
@use "@shared/styles/mixins.scss" as *;
|
|
`,
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
},
|
|
preview: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
},
|
|
define: {
|
|
__API_BASE_URL__: JSON.stringify(import.meta.env?.API_BASE_URL || 'http://localhost:4000/chad'),
|
|
__COMMIT_SHA__: JSON.stringify(import.meta.env?.COMMIT_SHA || 'local'),
|
|
},
|
|
})
|