Code Monkey home page Code Monkey logo

Comments (7)

brunocodutra avatar brunocodutra commented on July 19, 2024 1

You should be able to use the repo url (including the branch) in place of the version string in package.json

from webapp-webpack-plugin.

keepitterron avatar keepitterron commented on July 19, 2024 1

Hey @brunocodutra can confirm it works flawlessly for me!
It generates the icons and it inject them correctly using the alpha version of html-webpack-plugin 🎉

from webapp-webpack-plugin.

jantimon avatar jantimon commented on July 19, 2024

The html-webpack-plugin is already following a webpack recommendation to increase the hook performance:

webpack/webpack#7673
webpack/webpack#7672

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

The new event name and timing can be seen in this chart:

However as the html-webpack-plugin is an optional dependency you will probably need some "optional require" like the webpack-subresource-integrity plugin did:

https://github.com/waysact/webpack-subresource-integrity/blob/6d55aaded4ca50ffc48e6dabb66f41aaa9b6ef28/index.js#L13-L25

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
    }>

from webapp-webpack-plugin.

brunocodutra avatar brunocodutra commented on July 19, 2024

@jantimon Thanks a lot for the pointers
@aaronjensen This is definitely on my radar, it's just a matter of finding time to do it

Actually t wasn't too hard, so I went ahead and added support to v4 already. Do you think you could check whether #131 works for you and let me know before I merge it?

from webapp-webpack-plugin.

keepitterron avatar keepitterron commented on July 19, 2024

Hey @brunocodutra any news on this? Any way I can help?
I'd love to use this plugin with html-webpack-plugin@next!

from webapp-webpack-plugin.

brunocodutra avatar brunocodutra commented on July 19, 2024

PR #131adds support for it, do you think you could test it and let me know if it works for you?

from webapp-webpack-plugin.

keepitterron avatar keepitterron commented on July 19, 2024

Sure! Do I need to build the project or I can just drop-in replace it in the node_modules?

from webapp-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.