fix: reset getProxyOptions code and enabled sourcemap

This commit is contained in:
Shariq Ansari 2023-07-20 20:58:09 +05:30
parent b01b967436
commit a4ee48733f

View File

@ -9,17 +9,7 @@ export default defineConfig({
plugins: [vue()], plugins: [vue()],
server: { server: {
port: 8080, port: 8080,
// proxy: getProxyOptions({ port: webserver_port }), proxy: getProxyOptions({ port: webserver_port }),
proxy: {
'^/(app|login|api|assets|files)': {
target: `http://127.0.0.1:${webserver_port}`,
ws: true,
router: function (req) {
const site_name = req.headers.host.split(':')[0]
return `http://${site_name}:${webserver_port}`
},
},
},
}, },
resolve: { resolve: {
alias: { alias: {
@ -29,7 +19,7 @@ export default defineConfig({
build: { build: {
outDir: `../${path.basename(path.resolve('..'))}/public/frontend`, outDir: `../${path.basename(path.resolve('..'))}/public/frontend`,
emptyOutDir: true, emptyOutDir: true,
target: 'es2015', sourcemap: true,
}, },
optimizeDeps: { optimizeDeps: {
include: ['frappe-ui > feather-icons', 'showdown', 'engine.io-client'], include: ['frappe-ui > feather-icons', 'showdown', 'engine.io-client'],