vue.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. const path = require('path')
  2. module.exports = {
  3. publicPath: '/',
  4. lintOnSave: false,
  5. css: {
  6. loaderOptions: {
  7. sass: {
  8. sassOptions: {
  9. includePaths: ['node_modules', 'resources/assets']
  10. }
  11. }
  12. }
  13. },
  14. configureWebpack: {
  15. resolve: {
  16. alias: {
  17. '@resources': path.resolve(__dirname, 'resources/'),
  18. '@': path.resolve(__dirname, 'resources/js/src/'),
  19. '@themeConfig': path.resolve(__dirname, 'resources/js/themeConfig.js'),
  20. '@core': path.resolve(__dirname, 'resources/js/src/@core'),
  21. '@validations': path.resolve(__dirname, 'resources/js/src/@core/utils/validations/validations.js'),
  22. '@axios': path.resolve(__dirname, 'resources/js/src/libs/axios')
  23. }
  24. }
  25. },
  26. chainWebpack: config => {
  27. config.module
  28. .rule('vue')
  29. .use('vue-loader')
  30. .loader('vue-loader')
  31. .tap(options => {
  32. // eslint-disable-next-line no-param-reassign
  33. options.transformAssetUrls = {
  34. img: 'src',
  35. image: 'xlink:href',
  36. 'b-avatar': 'src',
  37. 'b-img': 'src',
  38. 'b-img-lazy': ['src', 'blank-src'],
  39. 'b-card': 'img-src',
  40. 'b-card-img': 'src',
  41. 'b-card-img-lazy': ['src', 'blank-src'],
  42. 'b-carousel-slide': 'img-src',
  43. 'b-embed': 'src'
  44. }
  45. return options
  46. })
  47. },
  48. transpileDependencies: ['vue-echarts', 'resize-detector']
  49. }