preact dev server proxies to rust dev server

This commit is contained in:
Vivian Lim 2020-07-19 18:01:22 -07:00
parent 35a912bd7a
commit a0436f8c87
1 changed files with 12 additions and 0 deletions

View File

@ -26,5 +26,17 @@ export default {
"src",
"index"
);
config.devServer.proxy = [{
// proxy requests matching a pattern:
path: '/api/**',
// where to proxy to:
target: 'http://localhost:8000',
// optionally change Origin: and Host: headers to match target:
changeOrigin: true,
changeHost: true,
}];
}
};