演示项目-图书馆
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.

54 lines
1.2 KiB

  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: 3000,
  14. open: true,
  15. overlay: {
  16. warnings: false,
  17. errors: true
  18. },
  19. proxy: {
  20. '/auth/': {
  21. target: process.env.VUE_APP_BASE_API,
  22. changeOrigin: true,
  23. pathRewrite: {
  24. '^/auth': 'auth'
  25. }
  26. }
  27. }
  28. },
  29. configureWebpack: {
  30. name: name,
  31. resolve: {
  32. alias: {
  33. '@': resolve('src')
  34. }
  35. },
  36. performance: {
  37. hints: 'warning',
  38. // 入口起点的最大体积
  39. maxEntrypointSize: 50000000,
  40. // 生成文件的最大体积
  41. maxAssetSize: 30000000
  42. }
  43. },
  44. chainWebpack: config => {
  45. config.resolve
  46. .alias.set('_c', resolve('src/components'))
  47. config.plugin('html')
  48. .tap(args => {
  49. args[0].title = '自助借还书机'
  50. return args
  51. })
  52. }
  53. }