vite.config.js 533 B

12345678910111213141516171819
  1. import { defineConfig } from 'vite';
  2. import vue from '@vitejs/plugin-vue';
  3. import path from 'path';
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. base: process.env.NODE_ENV === 'production' ? '/admin/' : '/',
  7. plugins: [vue()],
  8. css: {
  9. preprocessorOptions: {
  10. less: {
  11. modifyVars: {
  12. hack: `true; @import (reference) "${path.resolve('src/style/common.less')}";`
  13. },
  14. javascriptEnabled: true
  15. }
  16. }
  17. }
  18. });