vue.config.js 647 B

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict'
  2. const path = require('path')
  3. const PATH_NAME = 'dist'
  4. module.exports = {
  5. outputDir: PATH_NAME,
  6. publicPath: process.env.NODE_ENV === 'production' ? `/${PATH_NAME}/` : '/',
  7. configureWebpack: {
  8. resolve: {
  9. alias: {
  10. '@': path.resolve('src'),
  11. '@api': path.resolve('src/api')
  12. }
  13. },
  14. devServer: {
  15. headers: {
  16. // 'Access-Control-Allow-Origin': '*'
  17. },
  18. disableHostCheck: true
  19. }
  20. },
  21. css: {
  22. sourceMap: process.env.NODE_ENV === 'development',
  23. requireModuleExtension: true,
  24. loaderOptions: {
  25. less: {
  26. lessOptions: {
  27. }
  28. }
  29. }
  30. }
  31. }