code from source-map-loader is possibly ending up in the bundle #22998
Labels
area: @angular-devkit/build-angular
devkit/build-angular:browser
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: v12.xDescription
Producing a production bundle with enabled source maps causes the
source-map-loader
package itself to appear in the bundle. I think this is rather confusing sincesource-map-loader
is a webpack loader which should only be used at build time.I'm not sure though if some code of
source-map-loader
actually ends up in the bundle or the source maps are just wrongly pointing to it. Interestinglysource-map-loader
is not part of the source maps anymore withoptimization
turned off.🔬 Minimal Reproduction
npx @angular/cli new example cd example/ ng build --source-map
🔥 Exception or Error
The
main.hash.js.map
file has a reference to"./node_modules/source-map-loader/dist/cjs.js"
.🌍 Your Environment
Anything else relevant?
Running
ng build
with disabled optimization (ng build --source-map --optimization=false
) will produce source maps which don't include a reference to thesource-map-loader
package.The text was updated successfully, but these errors were encountered: