auto-inject-plugins
v0.0.3
Published
A plugin that automatically injects dependent files.
Downloads
2
Maintainers
Readme
auto-inject-plugins
因需要根据auto-inject-plugin插件改的,增加了使用内联html-webpack-inline-source-plugin插件后的判断,不再添加内联了的链接
A plugin that automatically injects dependent files.
Introduction
After splitting the third-party package, it is automatically injected into the corresponding page.
Installation
First, install the package as a dependency in your package.json:
yarn add -D auto-inject-plugins
Usage
Next, in your Webpack config, require() the preload plugin as follows:
const AutoInjectPlugin = require('auto-inject-plugins')
and finally, configure the plugin in your Webpack plugins array after HtmlWebpackPlugin:
plugins: [
new HtmlWebpackPlugin(),
new AutoInjectPlugins()
]