vue.config.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * @Author: zhuangzhou zhuangzhou@btioe.com
  3. * @Date: 2022-05-04 15:40:53
  4. * @LastEditors: zhuangzhou zhuangzhou@btioe.com
  5. * @LastEditTime: 2022-05-04 17:59:16
  6. * @FilePath: /mlmt-mini/vue.config.js
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. 'use strict'
  10. const path = require('path')
  11. function resolve(dir) {
  12. return path.join(__dirname, dir)
  13. }
  14. const name = 'mlmt-mini'
  15. module.exports = {
  16. lintOnSave: process.env.NODE_ENV === 'development',
  17. // 路径别名
  18. configureWebpack: {
  19. name: name,
  20. resolve: {
  21. extensions: ['.js', '.vue', '.json', '.jsx', '.mjs'],
  22. alias: {
  23. '@': resolve(''),
  24. '@/components': resolve('@/components'),
  25. '@/assets': resolve('@/assets'),
  26. '@/static/image': resolve('@/static/image'),
  27. '@/utils': resolve('@/utils'),
  28. '@/page': resolve('@/pages'),
  29. '@/service': resolve('@/service'),
  30. '@/store': resolve('@/store'),
  31. '@/utils/resource': resolve('@/utils/resource'),
  32. '@/mixin': resolve('@/mixin'),
  33. }
  34. }
  35. }
  36. }