Jagveer Singh
Jagveer Singh

Reputation: 375

How to remove Next.js chunk

I am working Next.js, Reactjs project. I want to remove chunk js files from _next/static/chunks folder because Lighthouse showing remove unused JS. Is this possible to remove all chunk files.

Upvotes: 9

Views: 5876

Answers (1)

Nasir
Nasir

Reputation: 80

These chunks are for converting your jsx or tsx files from js to html.

That's the whole concept of single-page applications (SPAs). Fast refreshing and state management are all controlled by those chunks.

Upvotes: 3

Related Questions