大空间消毒机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
788 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import { defineConfig } from 'vite'
  2. import { resolve } from 'path'
  3. import vue from '@vitejs/plugin-vue'
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. resolve: {
  7. alias: {
  8. '@': resolve(__dirname, 'src'),
  9. cpns: resolve(__dirname, 'src/components'),
  10. },
  11. extensions: ['.js', '.json', '.vue'],
  12. },
  13. plugins: [vue()],
  14. server: {
  15. host: '0.0.0.0',
  16. port: 5173,
  17. },
  18. //配置sass
  19. css: {
  20. preprocessorOptions: {
  21. scss: {
  22. additionalData:
  23. '@import "./src/assets/scss/globalVar.scss";@import "./src/assets/scss/globalMixin.scss";',
  24. },
  25. },
  26. },
  27. build: {
  28. minify: 'terser',
  29. terserOptions: {
  30. compress: {
  31. drop_console: true,
  32. drop_debugger: true, // 去除报错
  33. },
  34. },
  35. },
  36. })