Skip to content

Commit 506d7b4

Browse files
authored
fix(webpack): sourceMap path when using CommonJS (#11013)
1 parent 4c58adc commit 506d7b4

File tree

1 file changed

+1
-1
lines changed
  • packages/webpack5/src/configuration

1 file changed

+1
-1
lines changed

packages/webpack5/src/configuration/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export default function (config: Config, env: IWebpackEnv = _env): Config {
185185
config.devtool(sourceMapType);
186186

187187
// For ESM builds, fix the sourceMappingURL to use correct paths
188-
if (!env.commonjs && sourceMapType && sourceMapType !== 'hidden-source-map') {
188+
if (sourceMapType && sourceMapType !== 'hidden-source-map') {
189189
config
190190
.plugin('FixSourceMapUrlPlugin')
191191
.use(FixSourceMapUrlPlugin as any, [{ outputPath }]);

0 commit comments

Comments
 (0)