vue.config.js 684 B

123456789101112131415161718192021222324252627282930
  1. module.exports = {
  2. productionSourceMap: false,
  3. publicPath: process.env.NODE_ENV === 'production' ? '/assets/js/themes/' : './',
  4. css: { extract: false },
  5. chainWebpack: config => {
  6. config
  7. .plugin('html')
  8. .tap(args => {
  9. if (process.env.NODE_ENV === 'production') {
  10. args[0].filename = 'themes.html'
  11. args[0].template = './public/themes.html'
  12. }
  13. return args
  14. })
  15. },
  16. devServer: {
  17. open: false,
  18. host: '0.0.0.0',
  19. https: false,
  20. hotOnly: false,
  21. proxy: {
  22. '/assets': {
  23. target: 'http://localhost:9001'
  24. },
  25. '/themes': {
  26. target: 'http://localhost:9001'
  27. }
  28. }
  29. }
  30. }