Extension plugin for html-webpack-plugin to inline webpack's chunk manifest. Default inlines in head tag.
chunk-manifest-webpack-plugin
and removed overlaps. inline-chunk-manifest-html-webpack-plugin
now extracts chunk manifest.inline-chunk-manifest-html-webpack-plugin
remains the same.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
(https://github.com/soundcloud/chunk-manifest-webpack-plugin/issues/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.
chunk-manifest-webpack-plugin
is forked and included into inline-chunk-manifest-html-webpack-plugin
.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 functional updates.
Handle dependencies stricter; only install minor updates.
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
};
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()`
]
};
Use { dropAsset: true }
to not output chunk manifest asset (manifest.json).
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).