platypush/platypush/backend/http/webapp/vue.config.js

47 lines
913 B
JavaScript
Raw Normal View History

const httpProxy = {
target: 'http://localhost:8008',
changeOrigin: true
}
const wsProxy = {
target: 'http://localhost:8008',
changeOrigin: false,
ws: true,
onProxyReq: function(request) {
console.log('===== HERE');
console.log(request);
request.setHeader('Origin', 'http://localhost:8008');
},
}
2020-11-21 01:12:08 +01:00
module.exports = {
lintOnSave: true,
outputDir: "dist",
2020-11-21 01:12:08 +01:00
assetsDir: "static",
css: {
loaderOptions: {
sass: {
additionalData: `
2020-12-14 02:13:55 +01:00
@import '~w3css/w3.css';
2020-12-26 15:03:12 +01:00
@import "@/style/common.scss";
2020-11-21 01:12:08 +01:00
`
}
}
},
devServer: {
proxy: {
'/execute': httpProxy,
'/ws/events': wsProxy,
'/ws/requests': wsProxy,
'/static/*': httpProxy,
'/auth': httpProxy,
'/login': httpProxy,
'/logout': httpProxy,
'/register': httpProxy,
'/camera/*': httpProxy,
'/sound/*': httpProxy,
2020-11-21 01:12:08 +01:00
}
}
};