Ignore file in Next
There is no option to just exclude files from the build in NextJS. You need to either:
- Exclude it from the Webpack build in the underlying Webpack settings in Next OR
- Exclude files from compilation TypeScript IF using TypeScript
See Configuration: next.config.js Options | Next.js See next.config.js Options: webpack | Next.js