Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hagevvashi/6173a27db5abdfc4e1448a6e93363f01 to your computer and use it in GitHub Desktop.
Save hagevvashi/6173a27db5abdfc4e1448a6e93363f01 to your computer and use it in GitHub Desktop.
dev-serverのreverse proxyの設定
import { Configuration } from "webpack";
const config: Configuration = {
devServer: {
proxy: [
{
context: ["**"],
// 開発VMでのことを想定している場合は、os.type()やos.hostname()を使って柔軟に対応する
target: "http://localhost:8000",
},
],
},
};
export default config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment