webpack.start.js 509 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @fileoverview server.
  3. *
  4. * @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
  5. * @version 0.1.0.0, Jan 30, 2019
  6. */
  7. const path = require('path')
  8. module.exports = {
  9. mode: 'development',
  10. devServer: {
  11. contentBase: path.join(__dirname, '.'),
  12. port: 9000,
  13. proxy: {
  14. '/api': {
  15. target: 'http://localhost:8080',
  16. pathRewrite: {'^/api' : ''}
  17. },
  18. '/hacpai': {
  19. target: 'https://hacpai.com',
  20. pathRewrite: {'^/hacpai' : ''}
  21. }
  22. }
  23. }
  24. };