-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using [name]
within output.library
, the correct value isn't utilized in the source map namespace
#18243
Comments
[name]
within output.library
, the correct value isn't utilized in the source map namespace
Feel free to send a PR |
@bwhite94 where is the webpack.config.js file i have got the issue and i think that i have a solution for it but i was not able to find the file in the repo can you help me out. |
It's in the minimal reproduction repo, but more specifically here. I know of workarounds like generating separate webpack config objects for each entry-point that needs a different library name, but that defeats the purpose of using things like the |
@alexander-akait Currently we are generating sources is constructed with uniqueName. Either we need to use some other variable this is later parsed with getAssetPath or we need to update the uniqueName getter function. |
Yeah, feel free to send a PR, we can pass some things as options |
We already have |
Bug report
What is the current behavior?
When utilizing multiple entry points, and specifying a custom library name which includes the
[name]
placeholder, the source-map resource path is excluding the replaced[name]
value with an empty string.This is causing issues where sources will not be presented properly or may conflict if generated with the same
output.library
pattern.If the current behavior is a bug, please provide the steps to reproduce.
Minimal reproduction repository: https://github.com/bwhite94/webpack-source-map-issue
output.library
to include the[name]
placeholder. E.g:library-[name]
devtool: 'source-map'
exists in your webpack config object. (This may also exist with other devtools but haven't been tested)webpack://library-/...
What is the expected behavior?
The source map sources should include the correct namespace with the
[name]
value present. E.g:webpack://library-entry-a/...
andwebpack://library-entry-b/...
Other relevant information:
webpack version: 5.91.0
Node.js version: 20.11.1
Operating System: Windows 11
Additional tools:
The text was updated successfully, but these errors were encountered: