0.0.2 • Published 5 years ago

loader.mjs v0.0.2

Weekly downloads
13
License
-
Repository
github
Last release
5 years ago

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

  1. Download loader.mjs and place it somewhere
  2. Import modules to your script like
import module from 'https://cdn.jsdelivr.net/somelib@1/index.mjs'
  1. Launch your script with additional node --loader parameter like this:
node --experimental-modules --loader "path-to-loader.mjs" ./my-script.mjs