vue.config.js 867 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module.exports = {
  2. publicPath: process.env.NODE_ENV === 'production' ? '/main/' : '/',
  3. outputDir: 'dist/main',
  4. productionSourceMap: false,
  5. devServer: {
  6. open: false, // 是否自动弹出浏览器页面
  7. host: '0.0.0.0',
  8. port: '8081',
  9. https: false, // 是否使用https协议
  10. hotOnly: false, // 是否开启热更新
  11. proxy: {
  12. '/service': {
  13. target: 'http://192.168.3.105', // API服务器的地址
  14. ws: true, // 代理websockets
  15. changeOrigin: true, // 虚拟的站点需要更管origin
  16. pathRewrite: {
  17. '^/service': ''
  18. }
  19. }
  20. }
  21. },
  22. css: {
  23. loaderOptions: {
  24. stylus: {
  25. 'resolve url': true,
  26. 'import': [
  27. './src/theme'
  28. ]
  29. }
  30. }
  31. },
  32. pluginOptions: {
  33. 'cube-ui': {
  34. postCompile: true,
  35. theme: true
  36. }
  37. }
  38. }