Comments (7)
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.
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.
Can you put your example using github? thank you
from html-webpack-plugin.
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.
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.
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.
A little bit of research, and this version was the last version that works.
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)
- Writing Your Own Templates section does not work HOT 2
- ```[tasklist] ### My tasks - [ ] https://github.com/octo-org/octo-repo/issues/45 - [ ] Draft task ```
- Embed the script into HTML HOT 4
- Add a link rel=prefetch for a css chunks created within your wepbackPrefetch lazy loaded js chunks HOT 2
- Watch mode memory leak when saving HTML template HOT 1
- multi-page behavior illogical? HOT 1
- Memory leak in watch mode due to unique child compiler IDs HOT 1
- New version 5.6.0 introduce breaking changes to the plugin interface HOT 3
- CSS order not correct when using split chunks HOT 2
- File does not render correctly / cannot get variable from options HOT 3
- Allow plugin to run during a custom stage, or change default HOT 3
- Allow the plugin to support loaders that don't resolve to a single function HOT 2
- how to make webpack recompile on dev mode with cache on? HOT 15
- TypeError: childCompilation.errors.map is not a function HOT 1
- How to use alias in <%= require('html-loader!./partial.html').default %>? HOT 1
- How to add `onerror` event to the generated script tag? HOT 1
- remove inline script from index.html HOT 1
- Sometimes index.html is not packaged into the dist directory,about 1/3 probability or 1/4 probability HOT 2
- html-webpack-plugin Sometimes my template file index.html is not packaged into the dist directory, with a probability of 1/4 or 1/3, meaning it doesn't happen every time HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-webpack-plugin.