vue.config.js 593 B

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