preload-webpack-plugin
Advanced tools
Comparing version 2.1.2 to 2.2.0
@@ -76,2 +76,8 @@ /** | ||
} | ||
} else if (options.include === 'initial') { | ||
try { | ||
extractedChunks = compilation.chunks.filter(chunk => chunk.isInitial()); | ||
} catch (e) { | ||
extractedChunks = compilation.chunks; | ||
} | ||
} else if (options.include === 'all') { | ||
@@ -78,0 +84,0 @@ // Async chunks, vendor chunks, normal chunks. |
{ | ||
"name": "preload-webpack-plugin", | ||
"version": "2.1.2", | ||
"version": "2.2.0", | ||
"description": "Enhances html-webpack-plugin with link rel=preload wiring capabilities for scripts", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -135,4 +135,3 @@ preload-webpack-plugin | ||
You can also configure the plugin to preload all chunks (vendor, async, normal chunks) using | ||
`include`: | ||
You can also configure the plugin to preload all chunks (vendor, async, normal chunks) using `include: 'all'`, or only preload initial chunks with `include: 'initial'`: | ||
@@ -144,3 +143,3 @@ ```js | ||
rel: 'preload', | ||
include: 'all' | ||
include: 'all' // or 'initial' | ||
}) | ||
@@ -147,0 +146,0 @@ ] |
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
27979
130
283