depl.to
v0.0.10
Published
Serve an SPA with node_modules and zero config as a service
Downloads
12
Readme
depl.to
Serve an SPA with node_modules and zero config as a service (wip)
First, go to depl.to and connect with github.
Then, this is usage of depl.to from start to finish:
mkdir example && cd example
npm init
git init
git remote add origin [email protected]:owner/repo.git
touch index.html
- Edit
index.html
to your liking. - Optional: Use
npm i grainbox
to get SPA capabilities. git add . && git commit -m "init"
git push -u origin master
Your website is now available at https://repo.owner.depl.to
How it works
depl.to supports import statements with bare specifiers so that the browser can import from node_modules
. It does this by transforming files during a request using web-imports
.
Using the package.json
in the github repo, it generates a copy of node_modules
in a cache, and that is where node_modules
is served from.