listmonk/frontend/vue.config.js

41 lines
1.2 KiB
JavaScript
Raw Normal View History

module.exports = {
publicPath: '/admin',
outputDir: 'dist',
// This is to make all static file requests generated by Vue to go to
// /frontend/*. However, this also ends up creating a `dist/frontend`
// directory and moves all the static files in it. The physical directory
// and the URI for assets are tightly coupled. This is handled in the Go app
// by using stuffbin aliases.
assetsDir: 'static',
2020-08-25 13:45:32 +00:00
// Move the index.html file from dist/index.html to dist/frontend/index.html
// indexPath: './frontend/index.html',
productionSourceMap: false,
filenameHashing: true,
css: {
loaderOptions: {
sass: {
implementation: require('sass'), // This line must in sass option
},
},
},
devServer: {
port: process.env.LISTMONK_FRONTEND_PORT || 8080,
proxy: {
'^/$': {
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
},
2021-12-18 10:08:42 +00:00
'^/(api|webhooks|subscription|public|health)': {
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
},
'^/(admin\/custom\.(css|js))': {
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
}
}
}
};