https://github.com/gitim/empty-module-webpack-plugin
webpack plugin
https://github.com/gitim/empty-module-webpack-plugin
webpack webpack-plugin
Last synced: 7 months ago
JSON representation
webpack plugin
- Host: GitHub
- URL: https://github.com/gitim/empty-module-webpack-plugin
- Owner: gitim
- License: mit
- Created: 2016-08-09T22:00:06.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-09T22:00:18.000Z (over 9 years ago)
- Last Synced: 2025-07-02T20:42:31.691Z (7 months ago)
- Topics: webpack, webpack-plugin
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Empty module plugin for webpack
## Usage
Replaces the module of the request that matches `resourceRegExp` with an empty module.
If the second argument `source` is specified, it will be used as the source of the new module. If the `source` is a function, it will be called with the `request` and the result will be used as the source of the module.
```js
new EmptyModulePlugin(resourceRegExp)
new EmptyModulePlugin(resourceRegExp, '/* was replaced with empty module */')
new EmptyModulePlugin(resourceRegExp, (request) => '/* ' + request + ' was ignored */')
```
## License
MIT (http://www.opensource.org/licenses/mit-license.php)