@lucleray I don't know if it's related to next-compose-plugins but when I use this plugin the hash of the generated common chunks is wrong.
module.exports = withPlugins(
[
withCSS,
[
withSass,
{
sassLoaderOptions: {
includePaths: ['../../node_modules', 'node_modules', 'styles']
}
}
],
[
optional(() => withPurgeCss),
{
purgeCssPaths: ['pages/**/*', 'components/**/*', 'layouts/**/*'],
purgeCss: {
whitelist: ['__next']
}
},
[PHASE_PRODUCTION_BUILD]
]
]
)
Reproduce
- Use a class like
pt-xl-4 in exact one component. PurgeCss will include it because it's used. The hash of the file is something like .next/static/chunks/commons.d4d0b807.chunk.css.
- Remove the class
pt-xl-4 in the component and rebuild. You will see the hash hasn't changed but the class was removed by PurgeCss.
That's an indication that hash was generated on the content before purgecss proceed it.
We removed it completely from the build because it was the cause of several production cache issues.
@lucleray I don't know if it's related to
next-compose-pluginsbut when I use this plugin the hash of the generatedcommonchunks is wrong.Reproduce
pt-xl-4in exact one component. PurgeCss will include it because it's used. The hash of the file is something like.next/static/chunks/commons.d4d0b807.chunk.css.pt-xl-4in the component and rebuild. You will see the hash hasn't changed but the class was removed by PurgeCss.That's an indication that hash was generated on the content before purgecss proceed it.
We removed it completely from the build because it was the cause of several production cache issues.