fix non-devserver build
This commit is contained in:
parent
5b63ee4f37
commit
a2853c4a95
|
@ -30,16 +30,18 @@ export default {
|
||||||
config.resolve.alias["react"] = "preact/compat";
|
config.resolve.alias["react"] = "preact/compat";
|
||||||
config.resolve.alias["react-dom"] = "preact/compat";
|
config.resolve.alias["react-dom"] = "preact/compat";
|
||||||
|
|
||||||
config.devServer.proxy = [{
|
if (config.devServer){
|
||||||
// proxy requests matching a pattern:
|
config.devServer.proxy = [{
|
||||||
path: '/api/**',
|
// proxy requests matching a pattern:
|
||||||
|
path: '/api/**',
|
||||||
|
|
||||||
// where to proxy to:
|
// where to proxy to:
|
||||||
target: 'http://localhost:8000',
|
target: 'http://localhost:8000',
|
||||||
|
|
||||||
// optionally change Origin: and Host: headers to match target:
|
// optionally change Origin: and Host: headers to match target:
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
changeHost: true,
|
changeHost: true,
|
||||||
}];
|
}];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue