vite.config.js 575 B

123456789101112131415161718192021222324
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import VueDevTools from 'vite-plugin-vue-devtools'
  5. // https://vitejs.dev/config/
  6. export default defineConfig({
  7. plugins: [vue(), VueDevTools()],
  8. resolve: {
  9. alias: {
  10. '@': fileURLToPath(new URL('./src', import.meta.url))
  11. }
  12. },
  13. //配置sass
  14. css: {
  15. preprocessorOptions: {
  16. scss: {
  17. additionalData:
  18. '@import "./src/assets/scss/globalVar.scss";@import "./src/assets/scss/globalMixin.scss";'
  19. }
  20. }
  21. }
  22. })