1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import { fileURLToPath, URL } from 'node:url'
- import { defineConfig } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import graphql from '@rollup/plugin-graphql';
- import { viteRequire } from 'vite-require'
- import svgLoader from 'vite-svg-loader'
- export default defineConfig({
- plugins: [vue({
- template: {
- compilerOptions: {
- whitespace: 'preserve'
- }
- }
- }), graphql(), viteRequire(), svgLoader({defaultImport: 'raw'})],
- resolve: {
- alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url)),
- '@stores': fileURLToPath(new URL('./src/stores', import.meta.url)),
- '@components': fileURLToPath(new URL('./src/components', import.meta.url)),
- '@views': fileURLToPath(new URL('./src/views', import.meta.url)),
- '@api': fileURLToPath(new URL('./src/api', import.meta.url)),
-
- '@node_modules': fileURLToPath(new URL('./node_modules', import.meta.url))
- }
- },
- css: {
- preprocessorOptions: {
- scss: {
-
-
- additionalData: `@import "./src/assets/colors.scss";@import "./src/assets/common.scss";`
- },
- },
- },
- build: {
- rollupOptions: {
-
- },
- },
-
- esbuild: {
- drop: ['console', 'debugger'],
- },
- })
|