Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Releases: jouni-kantola/inline-chunk-manifest-html-webpack-plugin

Support extracting chunk manifest

09 Nov 14:49
Compare
Choose a tag to compare

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 into inline-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

21 Apr 13:24
Compare
Choose a tag to compare

No functional updates.

Handle dependencies stricter; only install minor updates.

Override default chunk manifest plugin

19 Apr 18:42
Compare
Choose a tag to compare

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

17 Apr 16:16
Compare
Choose a tag to compare

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

08 Apr 00:37
Compare
Choose a tag to compare

Use { dropAsset: true } to not output chunk manifest asset (manifest.json).

Reference chunk manifest from template

04 Apr 10:53
Compare
Choose a tag to compare

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).