https://github.com/amitsingh-007/webpack-watch-external-files-plugin
Webpack plugin to watch external files
https://github.com/amitsingh-007/webpack-watch-external-files-plugin
npm npm-package watch-external-files webpack webpack-plugin
Last synced: 4 months ago
JSON representation
Webpack plugin to watch external files
- Host: GitHub
- URL: https://github.com/amitsingh-007/webpack-watch-external-files-plugin
- Owner: amitsingh-007
- License: mit
- Created: 2021-05-18T17:00:35.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-01T15:24:25.000Z (6 months ago)
- Last Synced: 2025-03-06T00:40:34.585Z (4 months ago)
- Topics: npm, npm-package, watch-external-files, webpack, webpack-plugin
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/webpack-watch-external-files-plugin
- Size: 360 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Webpack Watch External Files Plugin
A Webpack Plugin having zero dependencies which allows you to watch external files which are not included in the webpack build. It triggers a webpack build if any external file changes.
  [](https://github.com/amitsingh-007/webpack-watch-external-files-plugin/actions/workflows/publish.yaml)  
## Install
```bash
npm install webpack-watch-external-files-plugin --save-dev
# or
yarn add webpack-watch-external-files-plugin --dev
```## Usage
```js
// webpack.config.js:const WatchExternalFilesPlugin = require('webpack-watch-external-files-plugin');
module.exports = {
plugins: [
new WatchExternalFilesPlugin({
files: ['/path/**/*.js', '/path/tofile.txt', '!./src/**/*.json'],
}),
],
};
```# Options
```js
new WatchExternalFilesPlugin({
files: [],
});
```- files[`list`] - a list of files or glob patterns