Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

webpack: Use assets object immutably.

Anders Kaseorg50062550690c
diff --git a/webpack.config.ts b/webpack.config.ts
index 846adbb70ca..add68ba5188 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -26,7 +26,14 @@ export default (env?: string): webpack.Configuration[] => {
name: "frontend",
mode: production ? "production" : "development",
context: __dirname,
- entry: assets,
+ entry: production
+ ? assets
+ : Object.fromEntries(
+ Object.entries(assets).map(([name, paths]) => [
+ name,
+ [...paths, "./static/js/debug"],
+ ]),
+ ),
module: {
rules: [
{
@@ -256,10 +263,6 @@ export default (env?: string): webpack.Configuration[] => {
};
if (!production) {
- // Out JS debugging tools
- for (const paths of Object.values(assets)) {
- paths.push("./static/js/debug");
- }
config.devServer = {
clientLogLevel: "error",
headers: {