loader.mjs

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i loader.mjs

Weekly Downloads

4

Version

0.0.2

License

none

Unpacked Size

3.21 kB

Total Files

3

Last publish

Collaborators

  • marlock