Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Proposal for external polyfills being included in shim #183
To solve this the proposal is to include a number of external polyfills/ponyfills in dojo/framework and re-export them to the end user as if they were any other kind of dojo shim. For example for IntersectionObserver may look like:
import global from '@dojo/framework/shim/global'; import 'intersection-observer'; export default global.IntersectionObserver as IntersectionObserver;
The end user would then leverage
From this, we can then also expand our current build capabilities to correctly include the polyfills based on whether a) they are used/imported, and b) if they are actually needed by the users browser based on a runtime check.