xq-csg-weapp_uni-ts
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.

30 lines
926B

  1. import { defineConfig } from "vite";
  2. import uni from "@dcloudio/vite-plugin-uni";
  3. const Timestamp = new Date().getTime()
  4. // https://vitejs.dev/config/
  5. export default defineConfig({
  6. plugins: [uni()],
  7. build: {
  8. sourcemap: false, // 输出.map文件,默认是false
  9. rollupOptions: {
  10. output: {
  11. chunkFileNames:`static/js/[name].[hash]${Timestamp}.js`,
  12. entryFileNames: `static/js/[name].[hash]${Timestamp}.js`,
  13. assetFileNames: `assets/[ext]/[name].[hash]${Timestamp}.[ext]`,
  14. },
  15. }
  16. },
  17. // publicPath: './',
  18. // server: {
  19. // proxy: {
  20. // "/admin-api": { // “/api” 以及前置字符串会被替换为真正域名
  21. // target: "http://47.92.245.35:5002", // 请求域名
  22. // secure: false, // 请求是否为https
  23. // changeOrigin: true, // 是否跨域
  24. // rewrite: (path) => path.replace(/^\/admin-api/, "")
  25. // }
  26. // }
  27. // }
  28. });