systemjs-unpkg
Auto-resolve bare specifiers in SystemJS using UNPKG.
Before
// Won't work unless the import map above is declaredconst _ = await System;
After✨
// Automatically resolved without import map!const _ = await System;
You can also specify npm semver ranges and tags
const $ = await System; const $ = await System; const d3 = await System;
Here's a starter CodePen template to get you started!
If you like this project, please star it & follow me to see what other cool projects I'm working on! ❤️
🙋♂️ Why?
- ⚡️ Simplify SystemJS setup Zero config setup to seamlessly resolve arbitrary bare specifiers with versions!
- 🔥 Import map fallback Only resolves specifiers that aren't defined in your import map!
- 🐥 Tiny Only
338B
!
🚀 Install
npm i systemjs-unpkg
🚦 Quick Setup
Simply load systemjs-unpkg
after you load SystemJS.
If you're using a JS bundler:
// Load systemjs; // Load the systemjs AMD extra, as most npm packages have UMD/AMD distributions; // Load systemjs-unpkg;
If in a browser:
<!-- Load systemjs --> <!-- Load the systemjs AMD extra, as most npm packages have UMD/AMD distributions --> <!-- Load systemjs-unpkg -->