vue.config.js 656 B

123456789101112131415161718192021222324252627282930313233343536
  1. const path = require('path')
  2. function resolve(dir) {
  3. return path.join(__dirname, dir)
  4. }
  5. const name = 'PornHub'
  6. module.exports = {
  7. productionSourceMap: false,
  8. // options...
  9. devServer: {
  10. port: 8080,
  11. proxy: {
  12. '/api': {
  13. target: 'http://127.0.0.1:8000',
  14. changeOrigin: true,
  15. ws: true,
  16. pathRewrite: {
  17. '^/api': '/api'
  18. }
  19. }
  20. }
  21. },
  22. configureWebpack: {
  23. // provide the app's title in webpack's name field, so that
  24. // it can be accessed in index.html to inject the correct title.
  25. name: name,
  26. resolve: {
  27. alias: {
  28. '@': resolve('src')
  29. }
  30. }
  31. }
  32. }