From d90673809753b3bbb22ab6b321e5a6baf96ba2de Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 20 Mar 2021 22:33:06 +0100 Subject: [PATCH] web: create separate chunk for poly Signed-off-by: Jens Langhammer --- web/rollup.config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/rollup.config.js b/web/rollup.config.js index 605815b7c..cac99e889 100644 --- a/web/rollup.config.js +++ b/web/rollup.config.js @@ -23,6 +23,10 @@ const resources = [ const isProdBuild = process.env.NODE_ENV === "production"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types function manualChunks(id) { + if (id.includes("construct-style-sheets-polyfill")) { + // Keep polyfills in the main file so they are loaded when dependencies are loaded + return "vendor-poly"; + } if (id.includes("node_modules")) { if (id.includes("codemirror")) { return "vendor-cm";