vue.config.js 687 B

1234567891011121314151617181920212223242526
  1. process.env.VUE_APP_VERSION = require('./package.json').version
  2. const { defineConfig } = require("@vue/cli-service");
  3. module.exports = defineConfig({
  4. //runtimeCompiler:true,
  5. transpileDependencies: true,
  6. lintOnSave: false,
  7. devServer: {
  8. proxy: {
  9. '/de8ca050_0dRC_b6f9': {
  10. target: 'http://152.136.144.149:9999/',
  11. changeOrigin: true, //需要代理跨域
  12. rewrite: (path) => path.replace(/^\/de8ca050_0dRC_b6f9/, ''), //路径重写,把'/api'替换为''
  13. },
  14. },
  15. },
  16. chainWebpack: config => {
  17. config.module
  18. .rule('glb')
  19. .test(/\.glb$/)
  20. .use('file-loader')
  21. .loader('file-loader')
  22. .end()
  23. },
  24. });