webpack-watch-external-files-plugin
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

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 bundlephobia Publish on NPM node-lts NPM

Install

npm install webpack-watch-external-files-plugin --save-dev
# or
yarn add webpack-watch-external-files-plugin --dev

Usage

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

new WatchExternalFilesPlugin({
  files: [],
});
  • files[list<string>] - a list of files or glob patterns

Package Sidebar

Install

npm i webpack-watch-external-files-plugin

Weekly Downloads

9,151

Version

3.1.0

License

MIT

Unpacked Size

5.03 kB

Total Files

7

Last publish

Collaborators

  • amitsingh5198