webpack-add-dependency-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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.

/webpack-add-dependency-plugin/

    Package Sidebar

    Install

    npm i webpack-add-dependency-plugin

    Weekly Downloads

    1

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    2.97 kB

    Total Files

    4

    Last publish

    Collaborators

    • bebraw