bebraw / webpack-add-dependency-plugin

Add dependencies to webpack dev process to watch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-add-dependency-plugin

In case you are including files to a webpack build indirectly, i.e. through mini-html-webpack-plugin, then it's likely webpack build process won't be aware of them while you are developing and running the project through webpack-dev-server or a similar solution. webpack-add-dependency-plugin solves this issue by letting you make webpack aware of these files.

Example:

import { AddDependencyPlugin } from "webpack-add-dependency-plugin";

module.exports = {
  ...
  plugins: [new AddDependencyPlugin({ path: "./templates/page.html" })],
};

Most likely you'll generate these declarations programmatically using tools like glob and webpack-merge but above should give you idea of the basic API.

About

Add dependencies to webpack dev process to watch


Languages

Language:TypeScript 100.0%