Next.js Discord

Discord Forum

npm run build doesn't respect .npmignore

Answered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I have a nextjs project with an api in the /backend directory that houses a laravel project. The problem is that when i run "npm run build" or "pnpm build" it crawls the laravel project and gives me errors there so i can't compile. I have added /backend to the .npmignore but it doesn't ignore the folder.
Answered by Dwarf Crocodile
Add folder to "exclude" tag in tsconfig.json
View full answer

2 Replies