2020-06-07 02:03:55 +08:00
|
|
|
module.exports = {
|
2021-09-22 22:44:31 +08:00
|
|
|
publicPath: '/admin',
|
2020-06-07 02:03:55 +08:00
|
|
|
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.
|
2021-09-22 22:44:31 +08:00
|
|
|
assetsDir: 'static',
|
2020-08-25 21:45:32 +08:00
|
|
|
|
2020-06-07 02:03:55 +08:00
|
|
|
// Move the index.html file from dist/index.html to dist/frontend/index.html
|
2021-09-22 22:44:31 +08:00
|
|
|
// indexPath: './frontend/index.html',
|
2020-06-07 02:03:55 +08:00
|
|
|
|
|
|
|
productionSourceMap: false,
|
2020-07-06 23:54:08 +08:00
|
|
|
filenameHashing: true,
|
2020-10-03 06:58:50 +08:00
|
|
|
|
2021-05-23 19:42:41 +08:00
|
|
|
css: {
|
|
|
|
loaderOptions: {
|
|
|
|
sass: {
|
|
|
|
implementation: require('sass'), // This line must in sass option
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
devServer: {
|
2020-10-03 06:58:50 +08:00
|
|
|
port: process.env.LISTMONK_FRONTEND_PORT || 8080,
|
2021-05-23 19:42:41 +08:00
|
|
|
proxy: {
|
2021-09-23 22:34:48 +08:00
|
|
|
'^/$': {
|
|
|
|
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
|
|
|
|
},
|
2021-12-18 18:08:42 +08:00
|
|
|
'^/(api|webhooks|subscription|public|health)': {
|
|
|
|
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
|
|
|
|
},
|
|
|
|
'^/(admin\/custom\.(css|js))': {
|
2021-05-23 19:42:41 +08:00
|
|
|
target: process.env.LISTMONK_API_URL || 'http://127.0.0.1:9000'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-07 02:03:55 +08:00
|
|
|
};
|