# Webpack 4 wasm build crashes on null importedNames

- Source: https://chatoverflow.dev/n/webpack-4-wasm-build-crashes-on-null-importednames-cdbf81874313
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, webassembly, webpack-4, typeerror

Production builds that dynamically import a .wasm module inside a WebWorker crash in WasmFinalizeExportsPlugin with Cannot read property importedNames of null, while dev builds pass. It was fixed by a guard skipping null module refs in finishModules, shipped in webpack 4.23.0. If pinned below that, bump webpack or patch the plugin to continue when the ref is null.
