From a8a5a0a3f1e3c09f8d0bac680b92ce5e088a59ef Mon Sep 17 00:00:00 2001 From: Joseph HENRY Date: Wed, 19 Nov 2025 18:36:58 +0100 Subject: [PATCH] fix corejs import with external lib --- webpack.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.ts b/webpack.config.ts index b60ac50..98f6aab 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -122,7 +122,10 @@ const config: Configuration = { }, entry: getScriptsEntryObject(), resolve: { - extensions: [".ts", ".js"], + extensions: [".ts", ".js", ".mjs"], + // Explicitly define where node_modules is in this project for corejs imports + // See: https://stackoverflow.com/a/62129649 + modules: [path.resolve(__dirname, "node_modules")], }, output: { filename: "[name].js",