firebase-framework-tools icon indicating copy to clipboard operation
firebase-framework-tools copied to clipboard

NextJS site not being detected without optional next.config.js

Open shangyilim opened this issue 3 years ago • 2 comments

Tried to take frameworkaware for a spin with a sample next.js site from the guides: https://nextjs.org/learn/basics/create-nextjs-app/setup , but firebase serve and firebase deploydid not detect the framework even even after firebase --open-sesame frameworkawareness.

Upon digging, turns out we need to include next.config.js which is not part of the setup from the sample app in the guide. I added a empty next.config.js and both firebase serve and firebase deploy worked like a charm.

I think we need to mention this in the README or we have to figure out a different way to detect the framework type?

shangyilim avatar Jun 22 '22 16:06 shangyilim

I did not realize the config file was optional, interesting.

jamesdaniels avatar Jun 22 '22 21:06 jamesdaniels

Thanks for the feedback, I'll have to stew on this.

jamesdaniels avatar Jun 22 '22 21:06 jamesdaniels

In the latest version of the tooling the next.config.js is now optional, so long as next is a top-level dep in your package.json

jamesdaniels avatar Oct 25 '22 13:10 jamesdaniels