vite.config.ts 587 B

1234567891011121314151617181920212223
  1. import path from 'path'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import legacy from '@vitejs/plugin-legacy'
  5. // https://vitejs.dev/config/
  6. export default defineConfig(({ command }) => ({
  7. plugins: [vue(), command === 'build' && legacy()].filter(Boolean),
  8. resolve: {
  9. alias: {
  10. '@': path.join(__dirname, 'src'),
  11. '@img': path.join(__dirname, 'src/assets'),
  12. },
  13. },
  14. css: {
  15. preprocessorOptions: {
  16. scss: {
  17. additionalData:
  18. '@import "@/style/_variables.scss", "@/style/_mixins.scss";',
  19. },
  20. },
  21. },
  22. }))