System.js
Dynamic ES module loader
README
SystemJS
SystemJS is a hookable, standards-based module loader. It provides a workflow where code written for production workflows of native ES modules in browsers (like Rollup code-splitting builds), can be transpiled to the System.register module format to work in older browsers that don't support native modules, running almost-native module speeds while supporting top-level await, dynamic import, circular references and live bindings, import.meta.url, module types, import maps, integrity and Content Security Policy with compatibility in older browsers back to IE11.
Sponsors
Support SystemJS by becoming a sponsor. Your logo will show up here with a link to your website.
Backers
Thank you to all our backers! 🙏 [Become a backer]
Overview
1. s.js minimal production loader
The minimal 2.8KB s.js production loader includes the following features:
Loads System.register modules, the CSP-compatible SystemJS module format.
* Support for loading bare specifier names with [import maps](docs/import-maps.md) via `` during parsing of the initial HTML page. However, IE11 does so. [Codesandbox demonstration](https://codesandbox.io/s/vibrant-black-xiok4?file=/index.html)Normally this is not an issue, as SystemJS will make an additional request via fetch/xhr for the import map. However, a problem can occur when the file is cached after the first request, since the first request caused by IE11 does not send the Origin request header by default. If the request requires CORS, the lack of an Origin request header causes many web servers (including AWS Cloudfront) to omit the response CORS headers. This can result in the resource being cached without CORS headers, which causes the later SystemJS fetch() to fail because of CORS checks.