1.1.0 • Published 6 years ago

browser-node-require v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

browser-node-require

Load the module of Node.js from the browser

!!! CAUTION !!!

Do not use this module in a production environment. This is written for DEVELOPMENT.

Usage

<script src="***/node_modules/browser-node-require/lib/index.js"></script>

This module defines a global function require, which can be handled in the same way as require of Node.js.

Other API

require.clearResolveCache()

Clear the cache of require.resolve recorded in session storage.

require.hardRefresh(includeNode = false)

Reload all modules and refresh the page. includeNode defines whether to reload the module under node_modules directory.

1.1.0

6 years ago

1.0.0

6 years ago