[guess-parser] Is not support Nextjs?
See original GitHub issueExpect behavior
- Configure guess.js configuration using by
guess-webpack
andguess-parser
- run
next build
- guess.js works well
Actual behavior
When we run next build
, we’ll get this error.
$ next build && next export
(node:57565) UnhandledPromiseRejectionWarning: Error: Cannot detect the application type
at exports.parseRoutes (/Users/development/next-app/node_modules/guess-parser/dist/guess-parser/index.js:860:15)
Issue
I’ve checked the code, I think the guess-parser
does not support nextjs.
Is it possible to support Nextjs?
I think we need the following conditions, isn’t it?
if (d('react') && d('next') {
return { ...ANY_CONFIG };
}
if (d('react') && d('next') && exists('tsconfig.json')) {
return { ...ANY_CONFIG };
}
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Supported Browsers and Features - Next.js
Supported Browsers and Features. Next.js supports modern browsers with zero configuration. Chrome 64+; Edge 79+; Firefox 67+; Opera 51+; Safari 12+ ...
Read more >Advanced Features: Next.js Compiler
This flag is only supported for compatibility with existing applications. We do not recommend using legacy decorators in new applications. First, update to...
Read more >Advanced Features: Turbopack | Next.js
Supported Features. To learn more about the currently supported features for Turbopack, view the documentation. Next.js CompilerPreview Mode ...
Read more >Advanced Features: Custom `Document` - Next.js
This new directory has support for layouts, nested routes, and uses Server ... Document currently does not support Next.js Data Fetching methods like ......
Read more >Blog - Next.js 13
The app/ directory introduces support for React's new Server Components ... During the alpha, many features are not yet supported.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, you are correct. The parser does not support Next.js which means that you can’t take advantage of the ahead of time prefetching of Guess.js. At the same time, you can embed the prefetching instructions for your entire application as part of your main bundle. This way you can enable predictive prefetching for your Next.js app.
You can find a demo with Next.js here https://github.com/mgechev/guess-next.