碳中和公园项目
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.

vite.config.ts 820B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { fileURLToPath, URL } from 'node:url'
  2. import { defineConfig } from 'vite'
  3. import vue from '@vitejs/plugin-vue'
  4. import autoprefixer from "autoprefixer"
  5. import postcsspxtorem from "postcss-pxtorem"
  6. export default defineConfig({
  7. base:"./",
  8. plugins:[
  9. vue(),
  10. ],
  11. css: {
  12. postcss: {
  13. plugins: [
  14. autoprefixer({
  15. overrideBrowserslist: [
  16. "Android 4.1",
  17. "iOS 7.1",
  18. "Chrome > 31",
  19. "ff > 31",
  20. "ie >= 8",
  21. "last 10 versions", // 所有主流浏览器最近10版本用
  22. ],
  23. grid: true
  24. }),
  25. postcsspxtorem()
  26. ],
  27. },
  28. },
  29. resolve: {
  30. alias: {
  31. '@': fileURLToPath(new URL('./src', import.meta.url))
  32. },
  33. extensions: ['.ts', '.js', '.vue', '.json'],
  34. }
  35. })