How to remove Next.js chunk

Viewed 3219

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.

1 Answers

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.

Related