vue.config.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. module.exports = {
  2. publicPath: '/admin',
  3. outputDir: 'dist',
  4. // This is to make all static file requests generated by Vue to go to
  5. // /frontend/*. However, this also ends up creating a `dist/frontend`
  6. // directory and moves all the static files in it. The physical directory
  7. // and the URI for assets are tightly coupled. This is handled in the Go app
  8. // by using stuffbin aliases.
  9. assetsDir: 'static',
  10. // Move the index.html file from dist/index.html to dist/frontend/index.html
  11. // indexPath: './frontend/index.html',
  12. productionSourceMap: false,
  13. filenameHashing: true,
  14. css: {
  15. loaderOptions: {
  16. sass: {
  17. implementation: require('sass'), // This line must in sass option
  18. },
  19. },
  20. },
  21. devServer: {
  22. port: process.env.LISTMONK_FRONTEND_PORT || 8080,
  23. proxy: {
  24. '^/$': {
  25. target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
  26. },
  27. '^/(api|webhooks|subscription|public|health)': {
  28. target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
  29. },
  30. '^/(admin\/custom\.(css|js))': {
  31. target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
  32. }
  33. }
  34. }
  35. };