vue.config.js 934 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = {
  2. publicPath: '/',
  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: 'frontend',
  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. '^/(api|webhooks)': {
  25. target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
  26. }
  27. }
  28. }
  29. };