vite.config.ts 570 B

12345678910111213141516
  1. import { defineConfig } from 'vite'
  2. import uni from '@dcloudio/vite-plugin-uni'
  3. // https://vitejs.dev/config/
  4. export default defineConfig({
  5. build: {
  6. // 开发阶段启用源码映射:https://uniapp.dcloud.net.cn/tutorial/migration-to-vue3.html#需主动开启-sourcemap
  7. sourcemap: process.env.NODE_ENV === 'development',
  8. // sourcemap: process.env.NODE_ENV === 'development',
  9. },
  10. plugins: [uni()],
  11. define: {
  12. 'process.env.VUE_APP_TEST': JSON.stringify('development'),
  13. 'process.env.VITE_AXIOS_BASE_URL': JSON.stringify('development'),
  14. },
  15. })