Releases: jouni-kantola/inline-chunk-manifest-html-webpack-plugin
Support extracting chunk manifest
Support extracting chunk manifest
TL;DR
- Forked
chunk-manifest-webpack-plugin
and removed overlaps.inline-chunk-manifest-html-webpack-plugin
now extracts chunk manifest. - Major version bump as an effect of dropping webpack 1 support. Now only supports webpack 2 and 3.
- API wise no updates, configuration of
inline-chunk-manifest-html-webpack-plugin
remains the same.
Background
Upgrades of inline-chunk-manifest-html-webpack-plugin
have up until now been prevented by a long-running issue in the dependency plugin chunk-manifest-webpack-plugin
(soundcloud/chunk-manifest-webpack-plugin#47). This in turn had the indirect effect of preventing users from upgrading to webpack 3. To enable independent updates of the plugin, chunk-manifest-webpack-plugin
is forked and included in the plugin.
Updates
chunk-manifest-webpack-plugin
is forked and included intoinline-chunk-manifest-html-webpack-plugin
.- Overlapping functionality with previous dependency plugin removed.
- Removed adding chunk manifest to chunks (soundcloud/chunk-manifest-webpack-plugin#47).
- Dropped webpack 1 support, and therefor major version bumped
inline-chunk-manifest-html-webpack-plugin
. There were code in the forked plugin that enabled backwards compatibility. However, as webpack 1 is deprecated, code for backwards compatibility was removed. - No configuration changes are required when consuming the plugin.
Handle dependencies stricter
No functional updates.
Handle dependencies stricter; only install minor updates.
Override default chunk manifest plugin
To use plugins like webpack-manifest-plugin
the default plugin used to extract the webpack chunk manifest can be overriden.
Added in this version are the following configs params:
const inlineChunkManifestConfig = {
/* all previous options still exist */
manifestPlugins: [/* override default chunk manifest plugin(s) */],
extractManifest: false // true is default. When set to false, manifestPlugins (incl default) are not applied
};
Reference chunk manifest internally
chunk-manifest-webpack-plugin
now a dependency to inline-chunk-manifest-html-webpack-plugin
.
Because the plugin practically is an extension of/for the result from chunk-manifest-webpack-plugin
, it might as well be referenced internally instead of having to match the config between the two plugins.
Now webpack's chunk manifest can be inlined using the following config:
module.exports = {
// your config values here
plugins: [
new HtmlWebpackPlugin({
template: './index-template.ejs'
}),
new InlineChunkManifestHtmlWebpackPlugin() // no need to reference `new ChunkManifestPlugin()`
]
};
Option to drop chunk manifest asset
Use { dropAsset: true }
to not output chunk manifest asset (manifest.json).
Reference chunk manifest from template
Default is still inlining in head tag.
Config option chunkManifestVariable
to explicitly inline chunk manifest in html-webpack-plugin
template. This opens up the possibility to inline in bottom of body (above webpack manifest).