vue.config.js 609 B

123456789101112131415161718192021222324252627282930
  1. const webpack = require('webpack')
  2. module.exports = {
  3. devServer: {
  4. port: 8000,
  5. proxy: {
  6. '^/api/question': {
  7. // target: 'http://localhost:4000',
  8. target: 'http://localhost:8080',
  9. ws: true,
  10. changeOrigin: true
  11. },
  12. '^/api/quiz': {
  13. // target: 'http://localhost:4000',
  14. target: 'http://localhost:8080',
  15. ws: true,
  16. changeOrigin: true
  17. }
  18. }
  19. },
  20. configureWebpack: {
  21. externals: {
  22. 'pdfjs': 'pdfjsLib'
  23. },
  24. plugins: [
  25. new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /zh-cn/)
  26. ]
  27. }
  28. }