README
loader.mjs
What is this
This is a module loader that allows you to load ES6 modules directly from internet like browsers do (for this time https
protocol is only supported)
How to use it
- Download loader.mjs and place it somewhere
- Import modules to your script like
import module from 'https://cdn.jsdelivr.net/somelib@1/index.mjs'
- Launch your script with additional node
--loader
parameter like this:
node --experimental-modules --loader "path-to-loader.mjs" ./my-script.mjs