Sfoglia il codice sorgente

feat: disable IIFE in bundle

Sven 1 anno fa
parent
commit
8df4b2df10
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      webpack.config.js

+ 5 - 0
webpack.config.js

@@ -13,6 +13,11 @@ export default {
     filename: "BetterYTM.user.js",
     path: join(dirname(fileURLToPath(import.meta.url)), "/dist"),
     clean: true,
+    module: true,
+  },
+  experiments: {
+    // userscripts are automatically wrapped in an IIFE by the browser extension, so this can be enabled
+    outputModule: true,
   },
   mode: minify ? "production" : "development",
   resolve: {