https://github.com/markogresak/ignore-not-found-export-webpack-plugin
Ignore webpack export not found warnings
https://github.com/markogresak/ignore-not-found-export-webpack-plugin
Last synced: about 1 month ago
JSON representation
Ignore webpack export not found warnings
- Host: GitHub
- URL: https://github.com/markogresak/ignore-not-found-export-webpack-plugin
- Owner: markogresak
- License: mit
- Created: 2019-04-11T19:37:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-28T14:15:12.000Z (over 2 years ago)
- Last Synced: 2025-03-27T02:43:33.470Z (about 2 months ago)
- Language: JavaScript
- Size: 218 KB
- Stars: 10
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# IgnoreNotFoundExportPlugin 
> Ignore webpack export not found warnings
## Install
```
npm install --save-dev ignore-not-found-export-webpack-plugin
```or
```
yarn add --dev ignore-not-found-export-webpack-plugin
```## Usage
:warning: This plugin can remove useful info about missing imports, which might deteriorate the development experience. Be careful with how you configure this plugin.
```js
const IgnoreNotFoundExportPlugin = require('ignore-not-found-export-webpack-plugin');module.exports = {
plugins: [new IgnoreNotFoundExportPlugin(options)],
// ...
};
```## API
### IgnoreNotFoundExportPlugin([options])
#### options
Type: `Object`
##### `include`
Type: `RegExp|RegExp[]`
Default: `/./` (allow any path)A regular expression or an array of regular expressions of import paths to include.
Example:
- `[/\.tsx?$/]`: ignore warnings only for imported `.ts` or `.tsx` files. Useful if re-exporting TypeScript `interface` (reference: [webpack#7378](https://github.com/webpack/webpack/issues/7378), [ts-loader#653](https://github.com/TypeStrong/ts-loader/issues/653))
## Credit
[@Strate](https://github.com/Strate) for [the idea and initial implementation](https://github.com/TypeStrong/ts-loader/issues/653#issuecomment-390889335).
## License
MIT © [Marko Grešak](https://gresak.io)