dojo / webpack-contrib

Plugins and loaders for webpack used with Dojo
Other
4 stars 19 forks source link

Using the fetch shim does not work in BTR's jsdom renderer when not building legacy #316

Open agubler opened 3 years ago

agubler commented 3 years ago

Bug

Dojo's fetch shim does not work with modern (the default setting) builds when using the jsdom renderer in BTR. Current in the modern setting fetch is statically set to "true" but this is not the case in a jsdom environment. As we do not want to do anything different build wise just for BTR we should consider allowing fetch to behave like the other browser api shim's such as intersection observer. This is to actually allow the sniff at runtime and load and register the shim if the environment requires. The fetch shim is a separate bundle already so this would not increase the amount of js loaded/parsed for an application unless the user environment did not have fetch (which is none of the modern browsers).