Closed topaxi closed 4 years ago
Thanks for your contribution. I see no problem using contenthash for css chunks.
But I'm not sure if this solves your problem. The change is only related to css chunk files. I have never used css chunks in a nitro project before. The webpack configuration should also prevent the extraction of chunks from css or scss files. I would be very interested to know what your setup looks like for this.
We have a component which lazyloads using the JavaScript import()
expression, which generates chunked assets.
function SomeComponent() {
React.useEffect(() => {
const { Component } = import('somepackage')
}, [])
}
In our application we had some cache hits on changed files which delivered outdated CSS to our users. Using the a hash instead of the id in the name of the asset should fix this.
I'm not sure if this has any bigger impact on the whole nitro setup though 🙃