Open skjnldsv opened 3 years ago
What is the current behavior?
The example given on the docs https://webpack.js.org/configuration/output/#outputdevtoolmodulefilenametemplate suggest using webpack:///${info.resourcePath}?${info.loaders}. But logging info shows that lots of the mentionned keys are not available
webpack:///${info.resourcePath}?${info.loaders}
info
If the current behavior is a bug, please provide the steps to reproduce.
Have a webpack config with the following output:
devtoolNamespace: appName, devtoolModuleFilenameTemplate(info) { const rootDir = process.cwd() const rel = path.relative(rootDir, info.absoluteResourcePath) console.info(info); return `webpack:///${appName}/${rel}?${info.loaders}` },
appName is a string. notifications is the current example I'm working on.
notifications
The console and sourcemap diffs logs:
{ identifier: [Getter/Setter], shortIdentifier: [Getter/Setter], resource: [Getter/Setter], resourcePath: [Getter/Setter], absoluteResourcePath: [Getter/Setter], allLoaders: [Getter/Setter], query: [Getter/Setter], moduleId: [Getter/Setter], hash: [Getter/Setter], namespace: [Getter/Setter] }
+?undefined ... etc
What is the expected behavior?
info.loaders should be defined
info.loaders
Other relevant information: webpack version: 5.31.2 webpack-cli version: 4.6.0 Node.js version: 14.16.0 Operating System: Linux workstation 5.10.26-1-lts webpack/webpack#1 SMP x86_64 GNU/Linux (Arch) Additional tools: -
For maintainers only:
We need update out docs
Bug report
What is the current behavior?
The example given on the docs https://webpack.js.org/configuration/output/#outputdevtoolmodulefilenametemplate suggest using
webpack:///${info.resourcePath}?${info.loaders}
. But logginginfo
shows that lots of the mentionned keys are not availableIf the current behavior is a bug, please provide the steps to reproduce.
Have a webpack config with the following output:
appName is a string.
notifications
is the current example I'm working on.The console and sourcemap diffs logs:
What is the expected behavior?
info.loaders
should be definedOther relevant information: webpack version: 5.31.2 webpack-cli version: 4.6.0 Node.js version: 14.16.0 Operating System: Linux workstation 5.10.26-1-lts webpack/webpack#1 SMP x86_64 GNU/Linux (Arch) Additional tools: -