东西湖大屏
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.

61 lines
1.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. const path = require('path')
  2. const resolve = dir => {
  3. return path.join(__dirname, dir)
  4. }
  5. const name = '智慧大屏'
  6. module.exports = {
  7. publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
  8. outputDir: 'dist',
  9. assetsDir: 'static',
  10. lintOnSave: process.env.NODE_ENV === 'development',
  11. productionSourceMap: false,
  12. devServer: {
  13. port: 8080,
  14. open: true,
  15. overlay: {
  16. warnings: false,
  17. errors: true
  18. },
  19. proxy: {
  20. '/dxhtsg/': {
  21. target: process.env.VUE_APP_BASE_API,
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/dxhtsg': 'dxhtsg'
  25. }
  26. },
  27. '/auth/': {
  28. target: process.env.VUE_APP_BASE_API,
  29. changeOrigin: true,
  30. pathRewrite: {
  31. '^/auth': 'auth'
  32. }
  33. }
  34. }
  35. },
  36. configureWebpack: {
  37. name: name,
  38. resolve: {
  39. alias: {
  40. '@': resolve('src')
  41. }
  42. },
  43. performance: {
  44. hints: 'warning',
  45. // 入口起点的最大体积
  46. maxEntrypointSize: 50000000,
  47. // 生成文件的最大体积
  48. maxAssetSize: 30000000
  49. }
  50. },
  51. chainWebpack: config => {
  52. config.resolve
  53. .alias.set('_c', resolve('src/components'))
  54. config.plugin('html')
  55. .tap(args => {
  56. args[0].title = '智慧大屏'
  57. return args
  58. })
  59. }
  60. }