Next.js Discord

Discord Forum

Serializing big strings (157kiB) impacts deserialization performance

Answered
Blue Picardy Spaniel posted this in #help-forum
Open in Discord
Blue Picardy SpanielOP
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)
<w> [webpack.cache.PackFileCacheStrategy] Serializing big strings (157kiB) impacts deserialization performance (consider using Buffer instead and decode when needed)

Why am I getting this warning? Btw I just switched from npm to pnpm
Answered by Blue Picardy Spaniel
Just fixed it, it was due to Mantine.

I just had to add this to my next.config.mjs:

experimental: {
   optimizePackageImports: ['@mantine/core', '@mantine/hooks'],
}
View full answer

1 Reply

Blue Picardy SpanielOP
Just fixed it, it was due to Mantine.

I just had to add this to my next.config.mjs:

experimental: {
   optimizePackageImports: ['@mantine/core', '@mantine/hooks'],
}
Answer