Commit graph

8490 commits

Author SHA1 Message Date
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
Alexander Kachkaev
e5da204aab
Upgrade browserslist to 4.16.6 (#24692)
## Bug

- [x] Related issue: [CVE-2021-23364](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23364)
- ~Integration tests added~ (N/A)
2021-05-16 18:30:02 +00:00
Julien Birgand
1ab90c142c
docs(image.md): update layout property part (#25149)
When I first read the documentation about the `layout` property, I wondered how to apply the `object-fit` css property to the `Image` component. I think it makes sense to mention its `objectFit` property at this point.
## Documentation / Examples

- [x] Make sure the linting passes
2021-05-16 17:59:50 +00:00
JJ Kasper
68ecbddd14
Re-add strip-ansi babel include (#25146) 2021-05-16 14:05:58 +02:00
James George
9b27d31d36
chore(create-next-app): remove stub type definitions (#25139)
[@types/next](https://www.npmjs.com/package/@types/next) is a stub types definition.
2021-05-16 05:29:50 +00:00
polygon
32b96551e7
typo fix (#25159)
Just a simple typo fix!
2021-05-15 20:42:52 +00:00
JJ Kasper
659dae0425
v10.2.1-canary.8 2021-05-14 15:41:49 -05:00
JJ Kasper
ec9ed57487
Remove import type syntax (#25145)
* Remove import type syntax

* Update build-output test
2021-05-14 13:42:36 -05:00
Tobias Koppers
84d5766f43
Disable suggesting incremental type checking (#25144)
It have performance characteristics that might not work for everyone.
You can still enable it manually.
2021-05-14 19:08:06 +02:00
Marius Craciunoiu
64a709db6c
Update docs to reflect page props are optional (#25142)
This PR changes the `GetServerSidePropsResult` type to require that it returns a `props` object. The docs mention it's required even for a redirect/notFound, and it throws and error if it's not returned.

From the docs:

> props - A required object with the props that will be received by the page component. It should be a serializable object

## 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-14 16:59:24 +00:00
Tim Neutkens
d9000d073b v10.2.1-canary.7 2021-05-14 16:41:54 +02:00
Tobias Koppers
0750092cf1
add experimental.gzipSize flag which allows to switch to uncompressed sizes (#25028)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-05-14 16:29:49 +02:00
Tim Neutkens
c1528e4f3d
Remove experimental-modern-preset option (#25100) 2021-05-14 15:55:24 +02:00
JJ Kasper
5bff9eac08
Ensure rewrites work with manual href/as correctly (#25112)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-14 12:50:41 +02:00
JJ Kasper
e6a05ee940
Fix export worker threads options (#25063)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-05-14 12:50:29 +02:00
Yamagishi Kazutoshi
7f73b65849
Escape href when detecting already existing preload tags (#20782)
When Image Optimization is enabled, if the URL of the image is not correct as a regular expression (e.g. `/image.png?lang=c++`), Next.js will give an error and fail to build.
2021-05-14 02:40:20 +00:00
JJ Kasper
22e3f8c2e7
docs(rewrites.md): update beforeFiles note (#25113)
This updates the beforeFiles rewrites note to mention the rewrites can affect `_next` files which are required for loading pages client-side. 

## Documentation / Examples

- [x] Make sure the linting passes
2021-05-13 18:32:46 +00:00
Tim Neutkens
7cb00b841f
Remove leftover babel include regex (#25101)
This regex is no longer needed since it no longer matches with the strip-ansi version that is bundled with Next.js



## 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-13 17:14:29 +00:00
Rishabh Poddar
8fe30fe49e
Updates SuperTokens dependency version (#25102)
It's a change to the package.json file to update the supertokens-auth-react version. The changes in this version are:
- How supertokens session works in the context of an iframe
- Dependencies of supertokens-auth-react now use a `^`

--------
One more change is to do with how the redirection works in the demo app in case of session expiry or if a user clicks on signout.
2021-05-13 14:50:40 +00:00
Tim Neutkens
7d75bc3ed1 v10.2.1-canary.6 2021-05-13 16:32:33 +02:00
Tim Neutkens
a1e16dc944
Update rewrites doc to mention they are applied to client-side routing (#25099)
Updates an old message in the docs that caused some confusion here: https://github.com/vercel/next.js/issues/24904#issuecomment-837086983

## 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-13 14:14:42 +00:00
JJ Kasper
40e178e611
Ensure rewrite does not override params from page in minimal mode (#25074)
This makes sure a catch-all rewrite doesn't override the params from a dynamic route in minimal mode, it also makes sure we don't attempt applying headers and rewrites un-necessarily in minimal mode. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-13 11:40:25 +00:00
Janicklas Ralph
eaf74c1cb8
Improving script loading strategy (#24939) 2021-05-13 12:39:36 +02:00
Marcos Taron
1cb83c1b35
update create-next-app documentation (#25079)
Update `create-next-app` documentation based in #25010 issue. 


## Documentation / Examples

- [X] Make sure the linting passes
2021-05-13 10:39:21 +00:00
Janicklas Ralph
7b0fe0d73b
Fix no-sync-scripts doc (#25062)
## Bug

Fix no-sync-scripts doc
2021-05-13 10:08:07 +00:00
Tobias Koppers
288984b1ea
enable contenthashing in webpack 5 (#25055)
This improves long term caching by avoiding hash changes

workaround fix #25013 
The real problem is fixed by #24573

## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-12 16:33:51 +00:00
Tobias Koppers
5f3351dbb8
use official mini-css-extract-plugin and experimentalUseImportModule (#24573)
## 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-12 16:04:01 +00:00
JJ Kasper
9a0fc42d56
Fix ie11 support with webpack 5 (#25014)
This fixes ie11 compatibility that broke in https://github.com/vercel/next.js/pull/24656 from the polyfills not being loaded first, our existing ie11 test caught this but was failing, this ensures the test is passing again. This also updates the `hrefValue` optional chaining in the eslint plugin as these files aren't transpiled and related tests were failing in azure 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
2021-05-12 12:24:42 +00:00
Janicklas Ralph
6ad9172295
Font optimization bug fix (#24968) 2021-05-12 13:39:26 +02:00
Janicklas Ralph
b859c5bdf5
Refactor scriptloader option names (#25012) 2021-05-12 13:37:57 +02:00