Skip to content

Commit 06922fe

Browse files
MagicDuckEugeneHlushko
authored andcommitted
adding docs for new output.devtoolNamespace option and [namespace] placeholder
1 parent 05989b8 commit 06922fe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/content/configuration/output.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,12 @@ devtoolModuleFilenameTemplate: info => {
165165

166166
If multiple modules would result in the same name, [`output.devtoolFallbackModuleFilenameTemplate`](#output-devtoolfallbackmodulefilenametemplate) is used instead for these modules.
167167

168+
## `output.devtoolNamespace`
169+
170+
`string`
171+
172+
This option determines the modules namespace used with the [`output.devtoolModuleFilenameTemplate`](#output-devtoolmodulefilenametemplate). When not specified, it will default to the value of: [`output.library`](#output-library). It's use is to prevent source file path collisions in sourcemaps when loading multiple libraries built with webpack.
173+
For example, if you have 2 libraries, with namespaces `library1` and `library2`, which both have a file `./src/index.js` (with potentially different contents), they will expose these files as `webpack://library1/./src/index.js` and `webpack://library2/./src/index.js`.
168174

169175
## `output.devtoolNamespace`
170176

0 commit comments

Comments
 (0)