From b1d72353b00d596c08db0dee35c018c267b5c384 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Sun, 25 Apr 2021 18:20:51 +0200 Subject: [PATCH] fix: change globalObject to `globalThis` In ESM `this` is undefined at the top level. Instead to access the global object you must use `globalThis`. --- webpack.config.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.cjs b/webpack.config.cjs index 0b18dbb7..55e645ab 100644 --- a/webpack.config.cjs +++ b/webpack.config.cjs @@ -7,7 +7,7 @@ module.exports = { path: path.resolve(__dirname, "dist"), library: "WebIDL2", libraryTarget: "umd", - globalObject: "this" + globalObject: "globalThis" }, mode: "production", devtool: "source-map",