This ensures navigations to non-configured locales causes the 404 page to be shown, it also adds tests to ensure direct visits for non-configured locales 404s correctly.
Fixes: https://github.com/vercel/next.js/issues/19214
This PR removes the modern mode experiment because:
- It does not yield meaningful bundle size wins when compared to other initiatives we've taken
- It's not compatible with webpack 5 (which we're upgrading to)
- It's currently broken and causes most apps to malfunction
- There's no champion currently owning the experiment
We can re-introduce this in the future when we'd like to make it a default for all Next.js apps.
Note: **Next.js still supports Differential Loading (`nomodule`) and does it by default.** This PR strictly removes the experimental modern _syntax_, and does not disable our existing modern/legacy polyfilling.
---
Fixes#19200Fixes#18960Fixes#14707Fixes#14465
This ensures redirects are handled properly with i18n + `trailingSlash: true`, additional tests have also been added to ensure this is covered
Fixes: https://github.com/vercel/next.js/issues/19069
This makes sure SSG data is correctly prefetched for the default locale and other locales on the same page. Tests for this behavior have been added for catch-all and normal pages.
Closes: https://github.com/vercel/next.js/issues/19048
Building off the "Migrating to Next.js" section started, this doc provides information on using `rewrites`, `redirects`, and micro-frontends to incrementally adopt Next.js in your codebase.
The intention is to show people the correlation between things, in this case, understand the usage of the same key from the props and the rehydration.
Hopefully, this change will bring value as it has done with some Juniors already.
We accidentally regressed back in 9.5 and dropped support for inline CSS comments. PostCSS always parses these as pass-through (and not a syntax error), which can cause problems when minifying.
Browsers do a similar thing and ignore the comments.
To ensure we generate valid CSS, this adds support for stripping the CSS comments from the build.
---
Fixes#15589Closes#17130
`url` object is an instance of `url.URL` which has no property called `query` and it's causing an error with Next image-optimizer as you can see with the error log below.
```log
TypeError: Cannot destructure property 'url' of 'parsedUrl.query' as it is undefined.
at imageOptimizer (/[redacted]/node_modules/next/next-server/server/image-optimizer.ts:51:11)
at Object.fn (/[redacted]/node_modules/next/next-server/server/next-server.ts:617:11)
at Router.execute (/[redacted]/node_modules/next/next-server/server/router.ts:200:40)
at DevServer.run (/[redacted]/node_modules/next/next-server/server/next-server.ts:1017:41)
at DevServer.run (/[redacted]/node_modules/next/server/next-dev-server.ts:406:18)
at DevServer.handleRequest (/[redacted]/node_modules/next/next-server/server/next-server.ts:437:14)
at /[redacted]/server/next-wrapper.ts:9:5
```
1. updates the `.gitignore` for this example to ignore the temporary output folders. ( similar to #15783 )
2. change yarn run script to npm run script ( I don't like use yarn currently. )