Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to the html-webpack-plugin version 4 #80

Closed
jantimon opened this issue Sep 7, 2018 · 3 comments
Closed

Upgrading to the html-webpack-plugin version 4 #80

jantimon opened this issue Sep 7, 2018 · 3 comments

Comments

@jantimon
Copy link

jantimon commented Sep 7, 2018

The html-webpack-plugin version 4 is getting closer to a release.
Many information can be found in this pr: jantimon/html-webpack-plugin#953

A static version property was added:
https://github.com/jantimon/html-webpack-plugin/blob/d65b37d2c588047e0d81a38f4645fcdb3ead0b9e/index.js#L915-L927

The event system was changed alot to work with the new features:

Could you please give the new events a try and let me know if they work for your case?
https://github.com/jantimon/html-webpack-plugin/tree/webpack-4#events

beforeAssetTagGeneration hook

    AsyncSeriesWaterfallHook<{
      assets: {
        publicPath: string,
        js: Array<{string}>,
        css: Array<{string}>,
        favicon?: string | undefined,
        manifest?: string | undefined
      },
      outputName: string,
      plugin: HtmlWebpackPlugin
    }>

alterAssetTags hook

    AsyncSeriesWaterfallHook<{
      assetTags: {
        scripts: Array<HtmlTagObject>,
        styles: Array<HtmlTagObject>,
        meta: Array<HtmlTagObject>,
      },
      outputName: string,
      plugin: HtmlWebpackPlugin
    }>

alterAssetTagGroups hook

    AsyncSeriesWaterfallHook<{
      headTags: Array<HtmlTagObject | HtmlTagObject>,
      bodyTags: Array<HtmlTagObject | HtmlTagObject>,
      outputName: string,
      plugin: HtmlWebpackPlugin
    }>

afterTemplateExecution hook

    AsyncSeriesWaterfallHook<{
      html: string,
      headTags: Array<HtmlTagObject | HtmlTagObject>,
      bodyTags: Array<HtmlTagObject | HtmlTagObject>,
      outputName: string,
      plugin: HtmlWebpackPlugin,
    }>

beforeEmit hook

    AsyncSeriesWaterfallHook<{
      html: string,
      outputName: string,
      plugin: HtmlWebpackPlugin,
    }>

afterEmit hook

    AsyncSeriesWaterfallHook<{
      outputName: string,
      plugin: HtmlWebpackPlugin
    }>
@jscheid
Copy link
Collaborator

jscheid commented Sep 8, 2018

@jantimon thanks for the heads up -- I had a different comment here before but I was chasing a red herring. All good. I'll release a version compatible with 4.0.0-alpha.2 soon.

jscheid added a commit that referenced this issue Sep 8, 2018
jscheid added a commit that referenced this issue Sep 8, 2018
@jscheid jscheid closed this as completed in fe884f2 Sep 9, 2018
@jscheid
Copy link
Collaborator

jscheid commented Sep 10, 2018

Preliminary compatibility released in 1.1.0-rc.5.

I'm planning to release 1.1.0 proper soon, perhaps timed to coincide with the HWP 4.0.0 release if that's not too far out?

@jantimon
Copy link
Author

I'll let you know 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants