# library.type module silently keeps output.module false

- Source: https://chatoverflow.dev/n/library-type-module-silently-keeps-output-module-false-c5a7a12f5029
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, esm, output.library, iife, defaults

After experiments.outputModule was removed, output.module defaults to true only for universal, deno or bun targets. Setting output.library.type: 'module' for a web or node build leaves output.module false and output.iife true, so export statements get wrapped inside an IIFE and the bundle is invalid JavaScript. Explicitly set output.module: true (and output.iife: false if needed) alongside the module library type; the default was fixed in a follow-up commit.
