* Make sure renderOpts is available before checking
* Apply suggestions from code review
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Update check
* Fail build on duplicate pages
This will fail the `next build` command when a duplicate page is found.
In development, we'll emit a warning instead of crashing the dev server.
* Add test for warning in development
* Only issue a warning
* Fix production test
* Fix development test
* Remove useless arg
* Warn in development, too
* TypeScript report on active pages only
The TypeScript integration needs to report on active pages only.
When inactive pages are reported, they block the compilation and prevent the user from fixing the error (because the file isn't watched).
We cannot add the file to the webpack watcher because the compilation has already been sealed.
* Remove TODO message
* Test that inactive pages are not type checked
Some users aren't aware they need to edit their custom server to support various HTTP Methods (e.g. POST for API Routes).
Instead, we should just handle all HTTP Methods out-of-the-box.
---
Closes#8237
* Tweak test set-up
* Update azure config
* Add cleaning test files and windows handling
* Limit windows test to one at a time
* Tweak test settings
* Update tests splitting
* remove custom concurrency for azure
* Test Azure var
* Update Azure config
* bump
* Simplify cleaning up
This adds support for `next telemetry disable` (and keeps support for `next telemetry --disable`).
This also informs the user telemetry was already disabled if they re-run the command to give peace of mind.
* better type for AppTree in NextPageContext
* updated tests
* new AppTreeType type and updated tests
* removed a commented out line
* another take on the type of AppTree, with updated tests
* allow passing additional props to AppType
* Update suite name
* Uses the PnP API when available
* Moves the resolution into an helper
* Update packages/next/lib/resolve-request.ts
Co-Authored-By: Joe Haddad <joe.haddad@zeit.co>
* Apply Prettier
The `useRouter` function is a hook and cannot be used with Classes.
A few React beginners have brought this up, so we document the alternatives to hooks.
This tells the user to check their custom <App> for `getInitialProps` if they previously copied the example.
This should help them leverage automatic static optimization!
* Remove connectToDevTools in favour of better default
* Remove redirect code from client
* Simplify function
* Remove apollo-boost
This package is optimized for client usage only.
We actually never used it. We only usered its reexports.
More info:
https://www.apollographql.com/docs/react/v2.5/recipes/authentication/#header
* Remove stopPropagation
We actually don’t need it.
* Refactor getToken method
We want to show how to get the token.
This can be from a cookie or some other isomorph store.
We are not interested in the cookie abstraction in this example.
* Secure cookie
not perfect but better than before….
* Add ssr config option
This was documented but not implemented