An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

[![Build Status](https://travis-ci.org/buildo/require-noop.svg)](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']
});
```