Browse Source

feat: disable IIFE in bundle

Sven 1 năm trước cách đây
mục cha
commit
91ea128fcc
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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: {