Closed bugzpodder closed 4 years ago
It's shown because one file source map is "uninteresting". See https://github.com/danvk/source-map-explorer/issues/10. You are not the first who asks to remove this warning. Adding a flag to show/hide this particular message doesn't make sense to me. It's easier to ignore this case and left user unaware. But I want to hear @danvk opinion before removing the warning.
This warning makes 100% sense when the bundle is not split. source-map-explorer only supported single file output up until this year. Now that source-map-explorer supports viewing all js files in the same directory, it may make less sense to show it. We could potentially disable the warning when there are more than one file.
@bugzpodder so you're still getting an interesting visualization despite the warning? In that case I think your suggestion makes sense. Only show the warning if all the source maps have a single source.
Yes, I always get the correct TreeMap to show up with different sources in tact despite the warning. The warning might be more confusing for new users who have no idea what they are expecting.
Disagree w/ the conclusion here. Single file bundles can be common w/ Create React App builds (many times you will import a single CSS file into your app). The warning is annoying for consumers and suggests it is an error on their part when this is not actually the case. It will just cause more traffic to this issue...thanks for considering this.
@nikolay-borzov thanks!
Currently create-react-app suggests using source-map-explorer as the way to analyze bundles built by it. Since 2.0 it produces a single main bundle contains one chunk. As such the warning below is always showing:
build/static/js/runtime~main.190f72ac.js
I am not sure why this was shown but is there anyway to identify this use and not show it? You can repo by creating a new app and run yarn build: npx create-react-app myapp cd myapp yarn build