0.1.2 • Published 4 years ago
webpack-add-dependency-plugin v0.1.2
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.