1
0

vite.config.js 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import graphql from '@rollup/plugin-graphql';
  5. import { viteRequire } from 'vite-require'
  6. // https://vitejs.dev/config/
  7. export default defineConfig({
  8. plugins: [vue(), graphql(), viteRequire()],
  9. resolve: {
  10. alias: {
  11. '@': fileURLToPath(new URL('./src', import.meta.url)),
  12. '@stores': fileURLToPath(new URL('./src/stores', import.meta.url)),
  13. '@components': fileURLToPath(new URL('./src/components', import.meta.url)),
  14. '@views': fileURLToPath(new URL('./src/views', import.meta.url)),
  15. '@api': fileURLToPath(new URL('./src/api', import.meta.url))
  16. // '@icons': fileURLToPath(new URL('./node_modules/vue-material-design-icons', import.meta.url)),
  17. }
  18. },
  19. css: {
  20. preprocessorOptions: {
  21. scss: {
  22. // example : additionalData: `@import "./src/design/styles/variables";`
  23. // dont need include file extend .scss
  24. additionalData: `@import "./src/assets/colors.scss";@import "./src/assets/common.scss";`
  25. },
  26. },
  27. },
  28. })