rsnext/test/unit/isolated
Jiachi Liu 14e94e69c5
fix duplicated error logging when start server (#55328)
There're few places calling `loadConfig` to access nextjs config for different purpose, and every of them will do validation of next config scheme and could log the warnings potentially to cause duplicated warnings. To address that issue this PR limit the places when should the warnings be logged in certain places, mainly the `next` command entry. Refactor the API here to make it more explicit

Previous logging redeisgn also might trigger duplicated compilation, for instance you compiled page A but then editing another component it might still displaying page A is recompiled. Now we always display `"Compiled .."` message when there's a recompilation but avoid the unnecessary ones such as initial edge compilor ready but there's no modules inside. Then when it recompiles or recovers from error nextjs server will tell "Compiled .." instead of the specific page which might be not related.

Also refactors a minor issue: When `silent` option is set to `true`, auto recorrect next config option from `loadConfig` API like `traillingSlash` is not working

Closes NEXT-1610

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-09-13 22:25:41 +00:00
..
_resolvedata BREAKING CHANGE: Remove target: serverless (#41495) 2022-10-18 09:47:13 -07:00
.gitignore Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
config.test.ts fix duplicated error logging when start server (#55328) 2023-09-13 22:25:41 +00:00
require-page.test.ts Fix require cache conflict between app and pages (#46736) 2023-03-03 12:24:09 -08:00