Commit graph

8569 commits

Author SHA1 Message Date
Thomas Boyt
327488dacb
Improve documentation of CDN asset paths (#25531)
I've been working on adding CDN support to my Next.js app and was very surprised to find that the `assetPrefix` did not turn `/_next/static/chunks/sha.js` into `$assetPrefix/chunks/sha.js`, but instead `$assetPrefix/_next/static/chunks/sha.js`. Hopefully this change to the documentation will make this behavior much more clear to future users.

I've also incorporated a warning against uploading the entire `.next` folder to a CDN, as I saw @timneutkens note in a discussion here: https://github.com/vercel/next.js/discussions/11622#discussioncomment-3779

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-27 23:23:12 +00:00
Artem Zakharchenko
9b75b9baa8
Example: Treat "mockServiceWorker" as a generated artifact in "with-msw" (#25515)
## Changes

- Removes `mockServiceWorker.js` file and ignores it from Git. New versions of `msw` generate the worker script automatically at the location specified in `packageJson.msw.workerDirectory`. This keeps the worker script up-to-date with the currently installed version of `msw`.
- Updates `msw` package to the latest version for new features and stability improvements.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-27 23:18:15 +00:00
Lee Robinson
28501c6af4
Update Authentication docs to be an examples list. (#25497)
Replaces https://github.com/vercel/next.js/pull/25485.
2021-05-26 19:06:47 +00:00
JJ Kasper
08dce4bdc6
Ensure history navigates correctly with dynamic routes + basePath (#25459)
This ensures the `basePath` is correctly re-added to the `url` after resolving a dynamic route since the `url` stored in history is expected to already contain the `basePath`, an additional test has been added to ensure this is working correctly back/forward through history

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/25285
2021-05-26 07:58:05 +00:00
Gerrit Alex
3b9221ff10
fix(types): allow nonpromise return types for static functions (#24685)
## Bug

- [x] fixes #24684
- [x] Integration tests added

Intentionally omitted changing the types for `GetServerSideProps` etc. as its imo less reasonable to leverage SSR with a sync `getServerSideProps`. Can of course change the type too if you consider that also a valid case.
2021-05-25 10:35:21 +00:00
Josef Kahoun
f29dfe247f
Updated example name (#25428)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-24 20:40:47 +00:00
JJ Kasper
4f32a03ffa
v10.2.3 2021-05-24 14:20:31 -05:00
JJ Kasper
1745cf6566
v10.2.3-canary.1 2021-05-24 13:29:16 -05:00
JJ Kasper
38fa5ca226
Update beforeFiles rewrites to continue (#25418)
This updates beforeFiles rewrites to continue instead of matching a public file/page immediately after a match, this allows all beforeFiles routes to be checked before matching the filesystem.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-24 17:59:55 +00:00
Ondřej Chrastina
c348784aeb
New kontent UI screenshots (#25387)
## Documentation / Examples

Kontent CMS went through the UI redesign - <http://new-ui.kontent.ai/>.
* I am updating the example screenshots.
* \+ one fix of the URL in README.

- example was submitted by me in #16034

- [x] Make sure the linting passes
2021-05-24 11:41:03 +00:00
Tim Neutkens
c7596be786 v10.2.3-canary.0 2021-05-24 10:54:20 +02:00
Rubens de Melo
5c05f35a94
Update package.json blog-starter-typescript (#25361)
Update package.json dependencies
2021-05-24 10:44:28 +02:00
vmod
2e5fac7976
docs: typo in rewrites page (#25377) 2021-05-23 15:19:38 +02:00
JJ Kasper
a348407bcf
Ensure externals are correct for mini-css-extract-plugin (#25340)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-23 13:15:58 +02:00
JJ Kasper
0aef2728e4
Fix ie11 has rewrite test (#25342)
This updates the `rewrites-has-condition` tests to not rely on the `browser.log` method since it's not available with ie11

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-22 17:06:39 +00:00
Aleksander
48cbb81af0
Add missing i18n types in gip context (#25363)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [] Make sure the linting passes

Ref: #21930
2021-05-22 16:35:57 +00:00
Fabian Mastenbroek
09a4fadf79
Fix PatternFly 4 example (#25356)
This change fixes the issues with the PatternFly example showing how to
use PatternFly 4 in conjunction with Next.js:

1. next-transpile-modules has been updated to 7.2.0, which adds support
   for Global CSS imports used by PatternFly 4. This eliminates the
   custom Webpack modification that were necessary previously.
2. All dependencies have been updated to the latest version.
3. Documentation has been updated to include troubleshooting steps.

Addresses #20916
2021-05-22 15:06:14 +00:00
Tobias Koppers
7035a036ab
lazy load postcss plugins (#25317)
Improves startup performance

for vercel/front by ~1s
2021-05-21 00:31:45 +00:00
Jamie
1f9e958e97
Follow up rewrites regression test for #25208 (#25282)
## Summary

Follow up regression test for rewrites with a `has` condition throwing errors in older browsers  #25208.

@timneutkens Let me know if this is what you had in mind? 😸
2021-05-20 12:39:56 +00:00
Alex Brazier
14cedc755b
Update docs to show how to typecheck next.config.js (#25240)
## Documentation

Partially resolves #5318

- [x] Make sure the linting passes
2021-05-20 12:00:09 +00:00
JJ Kasper
24c3929ec4
v10.2.2 2021-05-19 20:32:11 -05:00
JJ Kasper
2482520cc2
v10.2.2-canary.1 2021-05-19 17:56:06 -05:00
Rahul Gaba
4688cfe218
Update the text for eslint/no-page-custom-font rule (#25117)
## Documentation / Examples

- [x] Make sure the linting passes
2021-05-19 22:47:38 +00:00
JJ Kasper
784c30ccdb
Update output size test to handle version change (#25275) 2021-05-19 17:12:56 -05:00
JJ Kasper
42a62f4c23
v10.2.2-canary.0 2021-05-19 15:58:06 -05:00
Vladik Tarasov
935a66de6d
react-loadable-plugin. Handle undefined opts.caller (#25264)
`caller` - in babel is optional field - https://babeljs.io/docs/en/options#caller

And it may be not provided by developer in transformFile

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

## Documentation / Examples

- [ ] Make sure the linting passes
2021-05-19 20:56:28 +00:00
JJ Kasper
c0a07aa9e0
Ensure CNA install succeeds with npm and example flags (#25267)
* Ensure CNA install succeeds with npm and example flags
2021-05-19 15:27:41 -05:00
JJ Kasper
ece07f6012
doc(typescript.md) Mention incremental type checking (#25268)
* doc(typescript.md) Mention incremental type checking

* Apply suggestions from code review

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>

Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2021-05-19 14:56:46 -05:00
Tobias Koppers
ccdcd3a64d
restore webpack defaults for managed/immutablePaths (#25250)
Due to bundling of webpack the default values can't be correctly detected
This restores the webpack defaults
2021-05-19 19:43:16 +00:00
Brad Cornes
ea1cdb2687
Update postcss-loader to 4.3.0 (#25197)
## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

This pull request upgrades `postcss-loader` from `4.0.3` to `4.3.0`. Version `4.3.0` [adds support](https://github.com/webpack-contrib/postcss-loader/pull/525) for the `dir-dependency` message type which PostCSS plugins can use to register directories as dependencies ([documentation](https://github.com/postcss/postcss/blob/main/docs/guidelines/plugin.md#31-use-messages-to-specify-dependencies)).
2021-05-19 19:14:46 +00:00
Tobias Koppers
96f9945ecb
server doesn't need to be contenthashing at all (#25251)
contenthashing is not useful for the server

cc @ijjk
2021-05-19 18:44:50 +00:00
JJ Kasper
9513572755
v10.2.1 2021-05-19 11:24:49 -05:00
JJ Kasper
7452567325
v10.2.1-canary.12 2021-05-19 10:50:08 -05:00
Janicklas Ralph
de42719619
Fix font optimization failing on some builds (#25071)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-19 12:05:12 +02:00
Tim Neutkens
b9b35d406c
Remove snippet that is not recommended. (#25220)
In general this means you did something wrong in your application (importing tests for example), so this should be fixed in the app, not using custom config.
2021-05-19 11:56:53 +02:00
James George
83a09eee03
test(create-next-app): assert for typescript template dependencies (#25214)
This PR aims at updating the `create-next-app` test suite to include an assertion for the dependencies specific to the typescript template.
218c6114c9/packages/create-next-app/create-app.ts (L214-L216)
2021-05-19 09:44:03 +00:00
JJ Kasper
25096df801
v10.2.1-canary.11 2021-05-18 16:58:00 -05:00
JJ Kasper
fb7342ac7c
Add default revalidate value to docs (#25238)
This makes sure to mention the default revalidate value is `false` or to not revalidate since it previously only mentions it's optional. 

## Documentation / Examples

- [x] Make sure the linting passes
2021-05-18 21:57:28 +00:00
Pepijn Senders
bd0448c365
Make next.config.js keys optional (#25204)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added

## Description

These values should be optional and not required on the `NextConfig` type.
2021-05-18 21:49:50 +00:00
Holiq Ibrahim
0a31a92a3c
fix respomsive example tailwind (#24582)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-05-18 16:17:21 -05:00
Ananta Bastola
5f30df2f06
docs(readme.md): add good first issue section to readme (#25085)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-05-18 16:10:01 -05:00
Jamie
fa5d41b346
fix: replace usage of fromEntries in browser bundled resolve-rewrites.ts (#25208)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added

Fixes #25207

Currently rewritten routes that use a `has` condition throw an `Object.fromEntries is not a function` error in older browsers.

## Documentation / Examples

- [x] Make sure the linting passes

## Solution

As mentioned in issue #25207, looks like last year the team decided not to include the `fromEntries` polyfill https://github.com/vercel/next.js/pull/15772#discussion_r463957221.

As such, we should avoid using non-polyfilled methods in core next.js code bundled in the browser.

This PR's changes should result in the same object being returned, without using `fromEntries`.
2021-05-18 20:18:57 +00:00
JJ Kasper
ac7c8f3585
Ensure default params are detected after rewrite (#25205)
* Ensure default params are detected after rewrite

* Add test case

* bump
2021-05-18 14:24:22 -05:00
Ikko Ashimine
78b17351fb
Fix typo in dev-build-watcher.js (#25196)
transtion -> transition
2021-05-18 12:26:22 +02:00
JJ Kasper
218c6114c9
v10.2.1-canary.10 2021-05-17 15:25:08 -05:00
JJ Kasper
9c6d7bbd14
Ensure server split chunks are nested in chunks dir (#25203) 2021-05-17 15:24:23 -05:00
Houssein Djirdeh
7426ebcbc3
ESLint Plugin: Image rules (#23402)
Adds a new image rule to `eslint-plugin-next`:

```
Do not use `<img>`. Use Image from `next/image` instead
```
2021-05-17 13:06:48 +00:00
Tim Neutkens
d746db6f5c v10.2.1-canary.9 2021-05-17 14:16:14 +02:00
Tobias Koppers
3bf4ae3767
performance improvement of static generation (#25035)
### move all access to built pages into worker pool

to allow parallelizing and avoid loading the bundles in the main thread

This improves performance of the static check step a bit and helps reducing memory load in main thread

### enable splitChunks for server build in webpack 5

This improves performance for static generation by loading less code due to reduced duplication
2021-05-17 12:04:06 +00:00
JJ Kasper
a4420532b9
Update @hapi/accept to latest (#24283)
Updates to the latest version of `@hapi/accept`, opening this one instead of https://github.com/vercel/next.js/pull/23142 since it has unrelated changes and is stale. 

Close: https://github.com/vercel/next.js/pull/23142
Fixes #20488
2021-05-16 19:01:24 +00:00