Skip to content

synchronous global require function for the browser to load commonjs modules from a (relative) path, a URL or npm

License

Notifications You must be signed in to change notification settings

serapath/npm-require

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-require

synchronous global require function for the browser to load commonjs modules from a (relative) path, a URL or npm

https://www.npmjs.com/package/npm-require

demo

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <script src="src/npm-require.js"></script>
  </head>
  <body>
    <script>
      var minixhr = require('minixhr') // from npm
      var pkg = require('./package.json')
      var demo = require('./demo') // resolves to `./demo.js`
      demo(pkg)
    </script>
  </body>
</html>

license

MIT

About

synchronous global require function for the browser to load commonjs modules from a (relative) path, a URL or npm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published