webpack: Include devServer settings unconditionally.

These are unused in production but there’s no harm in including them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-09-25 19:45:57 -07:00 committed by Tim Abbott
parent 5006255069
commit 9131b4f282
1 changed files with 3 additions and 6 deletions

View File

@ -260,18 +260,15 @@ export default (env?: string): webpack.Configuration[] => {
chunks: ["error-styles"],
}),
],
};
if (!production) {
config.devServer = {
devServer: {
clientLogLevel: "error",
headers: {
"Access-Control-Allow-Origin": "*",
},
publicPath: "/webpack/",
stats: "errors-only",
};
}
},
};
const serverConfig: webpack.Configuration = {
mode: production ? "production" : "development",