stealjs / steal

Gets JavaScript
https://stealjs.com
MIT License
1.36k stars 522 forks source link

JSON loaded from a shared bundles causes parsing warnings #1480

Closed matthewp closed 5 years ago

matthewp commented 5 years ago

The JSON extension attempts to JSON.parse() modules that it believes to be JSON. In a built application this should never occur because the modules are converted to AMD.

However when a JSON module is in a bundle other than the bundle from which the dependant module is, and that bundle has to be loaded, the defined format is not set on the JSON module, so the JSON extension attempts to parse it.

This should be straightforward to test which will show the problem more clearly.