Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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: 11 days ago
JSON representation

Webpack plugin to watch external files

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.


![npm](https://img.shields.io/npm/v/webpack-watch-external-files-plugin) ![bundlephobia](https://badgen.net/bundlephobia/min/webpack-watch-external-files-plugin) [![Publish on NPM](https://github.com/amitsingh-007/webpack-watch-external-files-plugin/actions/workflows/publish.yaml/badge.svg)](https://github.com/amitsingh-007/webpack-watch-external-files-plugin/actions/workflows/publish.yaml) ![node-lts](https://img.shields.io/node/v-lts/webpack-watch-external-files-plugin) ![NPM](https://img.shields.io/npm/l/webpack-watch-external-files-plugin)

## 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