node-https-loader
v0.1.0
Published
Custom HTTPS Loader for Node.js
Downloads
3
Readme
node-https-loader
HTTPS Custom Loader for Node.js
Experimental
It works with Node.js 10.5.0
and is subject for changes at any time
How to get started
- You need to specify
--experimental-modules
flag - You need to specify the loader in order to be able to load modules by
https
(--loader <LOADER_PATH>
)
Example
node --experimental-modules --loader ./node-https-loader.mjs test.mjs
How it works
- It loads desired script from the internet and saves it with hashed name
- When loads the next time it won't go to the internet, instead it will load the script from the disk
Caveats
- Saves loaded scripts to the
tmp/
by default (You should probably override it withNODE_HTTPS_MODULES
env) - Right now it works like browser
<script>
tag meaning it loads bundles only (for now at least)