html-webpack-injector
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "html-webpack-injector", | ||
"version": "1.1.1", | ||
"description": "Helps to inject chunks to head and body via HtmlWebpackPlugin", | ||
"version": "1.1.2", | ||
"description": "Helps to inject chunks to head and body via HtmlWebpackPlugin with additional options to add async/defer to chunks", | ||
"main": "index.js", | ||
@@ -12,3 +12,6 @@ "keywords": [ | ||
"webpack", | ||
"html-webpack-injector-head" | ||
"html-webpack-injector-head", | ||
"webpack-plugins", | ||
"html-webpack-plugin-async-defer", | ||
"async-defer-html-webpack-plugin" | ||
], | ||
@@ -15,0 +18,0 @@ "repository": "https://github.com/thearchitgarg/html-webpack-injector.git", |
@@ -65,1 +65,20 @@ <div align="center"> | ||
You have to add `_head` in the entry point chunk name and it will be automatically injected in the head. | ||
<h2 align="center">Provide Async Defer (Optional)</h2> | ||
You can specify scripts to be async or defer by adding additional `chunksConfig` option. | ||
```js | ||
plugins: [ | ||
new HtmlWebpackPlugin({ | ||
template: "./index.html", | ||
filename: "./dist/index.html", | ||
chunks: ["index", "index_head"], | ||
chunksConfig: { // Added option | ||
async: ["index_head"], | ||
defer: ["index"] | ||
} | ||
}), | ||
new HtmlWebpackInjector() | ||
] | ||
``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84
5854