https://github.com/buildo/require-noop
transform required files with given extensions in noops
https://github.com/buildo/require-noop
Last synced: 3 months ago
JSON representation
transform required files with given extensions in noops
- Host: GitHub
- URL: https://github.com/buildo/require-noop
- Owner: buildo
- License: mit
- Created: 2015-05-28T11:12:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-10T17:51:49.000Z (almost 11 years ago)
- Last Synced: 2025-09-20T19:52:51.816Z (11 months ago)
- Language: JavaScript
- Size: 629 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/buildo/require-noop)
# require-noop
Inhibits `require` on selected extensions.
Useful in isomorphic setups, where - for instance - we want `require('asset.png')` to use a webpack loader on the client, but result in a noop on the server.
## Installation
```
npm install require-noop
````
## Usage
```js
require('require-noop')({
extensions: ['.png']
});
```