https://github.com/amireh/webpack-optional-plugin
https://github.com/amireh/webpack-optional-plugin
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/amireh/webpack-optional-plugin
- Owner: amireh
- Created: 2018-09-03T19:25:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-06T19:15:40.000Z (over 6 years ago)
- Last Synced: 2025-01-28T18:38:55.364Z (4 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webpack-optional-plugin
Load a file from disk if it exists, otherwise yield a pre-defined null value.
## Usage
See the provided example.
## Options
### `include`
Type: `String|RegExp|Array.|Array.`
### `nullModulePath`
Type: `String`
Defaults to `webpack-optional-plugin/null.js`.
### `enabled`
Type: `Boolean`
Set to `false` to yield the null module for matching files even
regardless of whether the source file exists or not.This option is intended for use when building for production
so that the optional files aren't included in the bundle.## Changelog
### 1.1.0
- Added the `enabled` flag