Code Monkey home page Code Monkey logo

Comments (7)

CarlRaymond avatar CarlRaymond commented on August 21, 2024 1

I just published a minimal example at https://github.com/CarlRaymond/html-webpack-plugin-issue1848 with instructions to make it fail and succeed. Thanks!

from html-webpack-plugin.

xXACCEXx avatar xXACCEXx commented on August 21, 2024 1

Yea, thats cool. Just annoying since the version change between this one and the next is only a patch, but broke some of my code that hasn't changed in like a year.

Feels like the 'lazy' part of that is at least a minor change, instead of patch.

No worries though, I'll go through and make some changes on my project to handle this without depending on the .options interface.

from html-webpack-plugin.

alexander-akait avatar alexander-akait commented on August 21, 2024

Can you put your example using github? thank you

from html-webpack-plugin.

xXACCEXx avatar xXACCEXx commented on August 21, 2024

I am having the exact same issue.

My attempt at a workaround was to provide a function to filename to generate the string, but the config just contains a reference to the function, instead of the generated string.

This leads to something along the lines of not processing the output filename before generating the values being passed to the templateContent function.

from html-webpack-plugin.

xXACCEXx avatar xXACCEXx commented on August 21, 2024

A little bit of research, and this version was the last version that works.

https://www.npmjs.com/package/html-webpack-plugin/v/5.5.3

from html-webpack-plugin.

alexander-akait avatar alexander-akait commented on August 21, 2024

Sorry, please never rely on htmlWebpackPlugin.options (it will be removed in the next major release, except title), they are lazy evaleted, otherwise we can't calculate contenthash, so you need to find other logic

from html-webpack-plugin.

alexander-akait avatar alexander-akait commented on August 21, 2024

A little bit of research, and this version was the last version that works.

https://www.npmjs.com/package/html-webpack-plugin/v/5.5.3

it works because we don't make it lazy, so contenthash doesn't work properly and invalidation was broken

from html-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.