loader.mjs

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](https://raw.githubusercontent.com/KaMeHb-UA/loader.mjs/master/

Usage no npm install needed!

<script type="module">
  import loaderMjs from 'https://cdn.skypack.dev/loader.mjs';
</script>

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

  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