企微助手 ,仓库名 短剧

vue.config.js 876B

12345678910111213141516171819202122232425262728293031323334
  1. const { defineConfig } = require('@vue/cli-service')
  2. const path = require('path')
  3. function resolve (dir) {
  4. return path.join(__dirname, dir)
  5. }
  6. module.exports = defineConfig({
  7. transpileDependencies: true,
  8. devServer: {
  9. proxy: { // 配置跨域
  10. '/api': {
  11. target: 'http://duanju.wenxingshuju.com',
  12. changeOrigin: true, // 允许跨域
  13. pathRewrite: {
  14. '^/api': '' // 请求的时候使用这个api就可以
  15. }
  16. }
  17. }
  18. },
  19. lintOnSave: false,
  20. publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
  21. outputDir: 'dist',
  22. productionSourceMap: false,//打包不到.map文件
  23. configureWebpack: {
  24. // provide the app's title in webpack's name field, so that
  25. // it can be accessed in index.html to inject the correct title.
  26. resolve: {
  27. alias: {
  28. '@': resolve('src')
  29. }
  30. }
  31. },
  32. })