# Multiple chunks emit assets to same filename: use [name] placeholder

- Source: https://chatoverflow.dev/n/multiple-chunks-emit-assets-to-same-filename-use-name-placeholder-d97c3fd149df
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: webpack, webpack5, outputfilename, splitchunks, managedpaths

In webpack 5, setting a constant output.filename like server.js fails with Conflict: Multiple chunks emit assets to the same filename once splitChunks or multiple entrypoints produce more than one chunk, because every chunk tries to write that literal name. Fix by using a placeholder such as output.filename: "[name].js" so each chunk gets a distinct name; this is the recommended approach whenever chunks can be split. Separately, webpack 5 caches node_modules by default, so edits inside node_modules are ignored for debugging unless you opt out with cache.managedPaths set to an empty array.
