vite.config.mjs.timestamp-1714273363195-2e8e2afb15d6a.mjs 11 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. // vite.config.mjs
  2. import { resolve } from "path";
  3. import { defineConfig, loadEnv } from "file:///E:/QHdemo/province-vue-all/node_modules/vite/dist/node/index.js";
  4. import vue from "file:///E:/QHdemo/province-vue-all/node_modules/@vitejs/plugin-vue/dist/index.mjs";
  5. import Components from "file:///E:/QHdemo/province-vue-all/node_modules/unplugin-vue-components/dist/vite.js";
  6. import VueJSX from "file:///E:/QHdemo/province-vue-all/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
  7. import AutoImport from "file:///E:/QHdemo/province-vue-all/node_modules/unplugin-auto-import/dist/vite.js";
  8. import vueSetupExtend from "file:///E:/QHdemo/province-vue-all/node_modules/vite-plugin-vue-setup-extend/dist/index.mjs";
  9. import { visualizer } from "file:///E:/QHdemo/province-vue-all/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
  10. import Less2CssVariablePlugin from "file:///E:/QHdemo/province-vue-all/node_modules/antd-less-to-css-variable/dist/index.js";
  11. import viteCompression from "file:///E:/QHdemo/province-vue-all/node_modules/vite-plugin-compression/dist/index.mjs";
  12. var __vite_injected_original_dirname = "E:\\QHdemo\\province-vue-all";
  13. var r = (...args) => resolve(__vite_injected_original_dirname, ".", ...args);
  14. var vite_config_default = defineConfig(({ command, mode }) => {
  15. const envConfig = loadEnv(mode, "./");
  16. const alias = {
  17. "~": `${resolve(__vite_injected_original_dirname, "./")}`,
  18. "@/": `${resolve(__vite_injected_original_dirname, "src")}/`
  19. };
  20. return {
  21. server: {
  22. port: envConfig.VITE_PORT,
  23. proxy: {
  24. "/api": {
  25. target: envConfig.VITE_API_BASEURL,
  26. ws: false,
  27. changeOrigin: true,
  28. rewrite: (path) => path.replace(/^\/api/, "")
  29. }
  30. }
  31. },
  32. resolve: {
  33. alias
  34. },
  35. // 解决警告You are running the esm-bundler build of vue-i18n.
  36. define: {
  37. __VUE_I18N_FULL_INSTALL__: true,
  38. __VUE_I18N_LEGACY_API__: true,
  39. __VUE_I18N_PROD_DEVTOOLS__: true
  40. },
  41. build: {
  42. // sourcemap: true,
  43. manifest: true,
  44. brotliSize: false,
  45. rollupOptions: {
  46. output: {
  47. manualChunks: {
  48. echarts: ["echarts"],
  49. "ant-design-vue": ["ant-design-vue"],
  50. vue: ["vue", "vue-router", "pinia", "vue-i18n"]
  51. }
  52. }
  53. },
  54. chunkSizeWarningLimit: 1e3
  55. },
  56. plugins: [
  57. vue({
  58. script: {
  59. refTransform: true
  60. }
  61. }),
  62. viteCompression(),
  63. vueSetupExtend(),
  64. VueJSX(),
  65. AutoImport({
  66. imports: ["vue"],
  67. dirs: ["./src/utils/permission"],
  68. dts: r("src/auto-imports.d.ts")
  69. }),
  70. // 组件按需引入
  71. Components({
  72. dirs: [r("src/components")],
  73. dts: false,
  74. resolvers: []
  75. }),
  76. visualizer()
  77. ],
  78. css: {
  79. preprocessorOptions: {
  80. less: {
  81. javascriptEnabled: true,
  82. plugins: [new Less2CssVariablePlugin()]
  83. }
  84. }
  85. },
  86. optimizeDeps: {}
  87. };
  88. });
  89. export {
  90. vite_config_default as default,
  91. r
  92. };
  93. //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubWpzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRTpcXFxcUUhkZW1vXFxcXHByb3ZpbmNlLXZ1ZS1hbGxcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkU6XFxcXFFIZGVtb1xcXFxwcm92aW5jZS12dWUtYWxsXFxcXHZpdGUuY29uZmlnLm1qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmln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