UPDATE I ADDED:
setUser()
AFTER REMOVING cookie IN return STATEMENT OF logout ARROW FUNCTION
There might be some cases where you do not want to redirect users after logout rather let them remain in that same page BUT let them know they have logged out by some UI changes .
For that cases you might need the 'user' hook to update when users logs out .
CURRENTLY the 'user' hook DOES NOT UPDATE AUTOMATICALLY when the user logs out .
PAGE REFRESH NEEDED to update that.
So i propose that we might add setUser() to update user so that user never returns true until user is set some value again
Replace `url.parse` and `url.resolve` logic with whatwg `URL`, Bring in a customized `format` function to handle the node url objects that can be passed to router methods. This eliminates the need for `url` (and thus `native-url`) in core. Looks like it shaves off about 2.5Kb, according to the `size-limits` integration tests.
This adds handling for custom-routes with `basePath` to automatically add the `basePath` for custom-routes `source` and `destination` unless `basePath: false` is set for the route.
Closes: https://github.com/vercel/next.js/issues/14782
Found while working on figuring out this bug: https://twitter.com/timneutkens/status/1282129714627448832
I noticed that the node_modules got passed by the ignore still because when chokidar identifies a ignore pattern is a glob it treats the glob as-is instead of appending `/**` to the glob
Sorry if I'm mixed up here. Was trying to install this and realized the folder is just `/with-emotion`. Guessing this was merged to overwrite the pre-v10 example project.
Fix#14902
I created a separated helper that wraps `fs.promises.mkdir` and sets `recursive` option to `true` by default.
I'm not sure if this is the right approach (maybe it should just call `fs.promises.mkdir` from `create-app.ts`?), any thoughts?
Removed Option to enable `ReactProductionProfiling` from configuration and added a CLI switch for the same.
Users can now do `next build --profile` to enable react production profiling.
Also added a warning to notify users about the performance impact
Fixes: #14688
There is a bug in the cms-wordpress example due to a Wordpress plugin dependency. After running `npm install`, then either `npm run dev` or `npm run build`, the following errors appear in the console:
```shell
> cms-wordpress@1.0.0 dev /Users/jplew/Sites/projects/next.js/examples/cms-wordpress
> next
ready - started server on http://localhost:3000
info - Loaded env from /Users/jplew/Sites/projects/next.js/examples/cms-wordpress/.env.local
event - compiled successfully
event - build page: /
wait - compiling...
event - build page: /next/dist/pages/_error
event - compiled successfully
[
{
message: 'Cannot query field "name" on type "NodeWithAuthorToUserConnectionEdge". Did you mean "node"?',
extensions: { category: 'graphql' },
locations: [ [Object] ]
},
{
message: 'Cannot query field "firstName" on type "NodeWithAuthorToUserConnectionEdge".',
extensions: { category: 'graphql' },
locations: [ [Object] ]
},
{
message: 'Cannot query field "lastName" on type "NodeWithAuthorToUserConnectionEdge".',
extensions: { category: 'graphql' },
locations: [ [Object] ]
},
{
message: 'Cannot query field "avatar" on type "NodeWithAuthorToUserConnectionEdge".',
extensions: { category: 'graphql' },
locations: [ [Object] ]
}
]
Error: Failed to fetch API
at fetchAPI (webpack-internal:///./lib/api.js:31:11)
```
The reason for this is `wp-graphql` released version v0.10.0 ten days ago which introduced a number of breaking changes (https://github.com/wp-graphql/wp-graphql/releases/tag/v0.10.0). Specifically, this is the change that breaks the current example:
> - One to One relationships are now nested. For example post.author and post.featuredImage now return an edge/node instead of the node directly.
More info about this change can be found here: https://github.com/wp-graphql/wp-graphql/issues/347#issuecomment-639071772
After my changes, `npm run dev` and `npm run build` succeed without errors.
This adds additional checks against the routeKeys used to build the named regexes for dynamic routes to ensure they follow PCRE rules for named capture groups
x-ref: https://github.com/vercel/vercel/pull/4813
Fixes#14792Closes#14814
The project id is currently used by Sanity's image builder, which is used in a React component.
@maybac It was faster for me to create a new PR but the credit goes to you, thank you!.
Hi, we received some issues on the `react-three-fiber` and `drei` repos, mentioning broken ssr because of some examples where we import three's examples - like to implement loaders or controls.
This PR adds a next.config suggested by many that transpiles everything in three, drei and postprocessing.
I also added some code from `drei` that shows how controls and effects can be easily added.