Commit graph

1215 commits

Author SHA1 Message Date
강동윤
c38e702347
Make next-ssg optional (#28862)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-09-13 12:20:38 +02:00
Maia Teegarden
0d0f34ba18
Pass code as buffer to swc minify (#29009)
This should fix this: https://github.com/vercel/next.js/pull/28883/checks?check_run_id=3560578176#step:4:353



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-09-11 00:57:01 +00:00
Maia Teegarden
63e71b585d
Update swc in next-swc (#28970)
* Update swc in next-swc

* Fix typo

Co-authored-by: Steven <steven@ceriously.com>

* Build next-swc binaries

Co-authored-by: Steven <steven@ceriously.com>
2021-09-09 20:02:57 +02:00
강동윤
a84389591d
Update swc (#28946)
## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes



I updated rust dependencies and node dependencies.
2021-09-09 09:30:22 +00:00
Gerald Monaco
dd55f98291
Simplify RenderResult (#28900)
We're no longer currently planning on supporting caching for dynamic responses, so we can do some cleaning & simplification:
* Multiplexing can be removed since we only ever subscribe once (via `RenderResult.pipe`, described below)
* `RenderResult.toUnchunkedString` can become synchronous since static responses are never chunked
* `RenderResult.forEach` can become `RenderResult.pipe` which helps encapsulate some of the details of `RenderResult`
2021-09-08 16:56:31 +00:00
Maia Teegarden
4f8d883acd
Fix/swc minify (#28898)
* Expose minify in next-swc

* Expose minify in js binding

* Use new minify function in terser plugin

* Only upload changed binary artifact

* Build next-swc binaries

* Add swc license info to copied file
2021-09-07 15:57:47 -07:00
Tim Neutkens
7266d7563f
Remove unused dependencies (#28876) 2021-09-07 15:36:12 +02:00
Tim Neutkens
53c4daa557
Remove unused profiler (#28844) 2021-09-07 13:46:38 +02:00
Tim Neutkens
cab846481d
Remove outdated webpack conformance experiment (#28846) 2021-09-07 13:27:23 +02:00
Perry Olsson
3b55a37c81
Webpack rule to block importing images into _document (#28475) 2021-09-06 13:41:18 +02:00
Gerald Monaco
eab3db20c3
Simplify static + dynamic HTML generation (#28793) 2021-09-06 12:23:07 +02:00
Tim Neutkens
f9987b09e2
Add tracing for css-loader (#28756)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Steven <steven@ceriously.com>
2021-09-06 10:59:38 +02:00
Tobias Koppers
dc1e906eb2
update webpack to 5.52.0 (#28771) 2021-09-06 10:59:23 +02:00
Tim Neutkens
16d6eba1c9
Reuse warning from postcss-loader (#28727)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-05 14:22:34 +02:00
Gerald Monaco
7f83e6d15d
Add RenderResult class (#28776) 2021-09-04 09:41:06 -05:00
JJ Kasper
14a999ed73
Ensure build trace handles mixed modules (#28770) 2021-09-03 11:30:00 -05:00
Tim Neutkens
5a2634e015
Update css-loader runtime to use compiled files (#28735) 2021-09-02 13:39:19 +02:00
Tim Neutkens
9a56fdba82
Use consistent postcss version for all transforms (#28529)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-02 08:45:35 +02:00
JJ Kasper
9a6542ba68
Ensure build trace is correct with extra entries (#28667)
* Ensure build trace is correct with extra entries

* lint-fix

* fix check on windows
2021-09-01 10:56:04 -05:00
Tobias Koppers
f6d8a112df
fix esm externals edge case with "module" condition (#28612)
prefer commonjs externals even if "module" condition is used in package.json



## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2021-08-31 08:32:33 +00:00
JJ Kasper
ff9dcc6a47
Ensure custom app regex is correct for Windows (#28631)
* Ensure custom app regex is correct for Windows

* lint-fix

* update test for ie

* update test

* lint-fix
2021-08-30 20:09:48 -05:00
Gerald Monaco
2cc2cb4f77
Support for functional Document components (#28515) 2021-08-26 10:05:01 -05:00
Tim Neutkens
c65248d732 Remove unused imports 2021-08-25 11:11:45 +02:00
Tim Neutkens
9316dc0a8e
Add default trace format that is exported automatically (#28461)
Co-authored-by: Steven <steven@ceriously.com>
2021-08-25 10:47:16 +02:00
Mateusz Burzyński
c1a09471ff
Add missing typescript property to NextConfig (#28459)
This is similar to https://github.com/vercel/next.js/pull/27126 , https://github.com/vercel/next.js/pull/27446 and https://github.com/vercel/next.js/pull/27974

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes
2021-08-24 14:08:18 +00:00
Houssein Djirdeh
80921b6a54
enables eslint caching by default (#28349)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-23 12:56:21 -05:00
Jiachi Liu
b74ffffa96
Fix next env vars injection in dynamic (#28309)
* Treat `next/dynamic` as non external modules
* add feature flags to webpack cache version
2021-08-20 03:50:11 +00:00
JJ Kasper
9b09b92a14
Ensure adding _app/_document HMRs correctly (#28279)
This is a follow-up to https://github.com/vercel/next.js/pull/28227 to ensure `_app` and `_document` HMR correctly when you start the dev server and then add `_app` and `_document`. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

x-ref: https://github.com/vercel/next.js/issues/27888
2021-08-19 08:12:12 +00:00
JJ Kasper
15e8019263
Update generating next-server dependencies (#28223)
* Update generating next-server dependencies

* Update tests

* ensure stale cache is not used
2021-08-18 10:41:40 -05:00
Tim Neutkens
e920dbc6e6
Add relationship between issuer and module to traces (#28192) 2021-08-18 14:22:53 +02:00
JJ Kasper
17d7e59339
Fix HMR when custom _app or _document is removed (#28227)
This adds the fallback webpack alias handling to handle a custom `_app` or `_document` being removed in development gracefully. 
 
## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/issues/27888
2021-08-18 11:01:02 +00:00
Gerald Monaco
51559f5c64
Use zen-observable library (#28214)
Our `Observable` use has gotten sufficiently complex that it makes sense to just use a 3rd party implementation and not worry about maintaining it ourselves. As a bonus, it doesn't rely on Node APIs.
2021-08-18 03:29:43 +00:00
Tobias Koppers
b594f5bcc0
let loaders automatically infer source map setting (#28204)
These loaders automatically use the global source map setting when this option is omitted
2021-08-17 17:48:48 +00:00
Tim Neutkens
2b7d4619ed
Improve jaeger traces (#28168)
Co-authored-by: Harsh Karande <harshskarande@gmail.com>
2021-08-17 09:18:47 +02:00
JJ Kasper
5544adc481
Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
Tim Neutkens
f28b965add
Add module type to build-module trace (#28128)
Add `-js` `-ts` `-tsx` `-css` to `build-module` in traces to allow for easier filtering. 

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-16 20:05:57 +00:00
JJ Kasper
24b09ad4f8
Add entrypoint tracing (#25538)
This adds tracing entrypoints directly after they have have been transpiled to allow us to trace before the webpack runtime has been added to the modules. This should allow for more accurate tracing of entrypoints and allow the trace step to be cached. 

## Bug

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


x-ref: https://github.com/vercel/next.js/issues/24700
x-ref: https://github.com/vercel/next.js/issues/26200
x-ref: https://github.com/vercel/next.js/issues/23894
x-ref: https://github.com/vercel/next.js/issues/25431
2021-08-16 19:29:11 +00:00
Tim Neutkens
eddf2054c2
Bypass webpack compilation for precompiled @next/polyfills-nomodule (#27596)
Removes the extra webpack handling that was previously done, this ensures the file which is already minified and compiled does not get passed through minification again.

Largely based on #21418
Closes #21418

The polyfill loading already has tests so no other changes are necessary.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-13 22:40:45 +00:00
Jiachi Liu
d14da39fd6
Support suspense in next dynamic (#27611)
### Changes
#### Feature
* Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true`
* Support `next/dynamic` with `suspense=true` in SSR and SSG

#### Tests

| Scenario | Case | Behavior |
|:----:|:----:|:----:|
| basics | react 17 or 18 by default | dev/build error or pass |
| blocking rendering | `reactRoot: true` + `concurrentFeatures: false` | dev/build pass |
| concurrent rendering | `reactRoot: true` + `concurrentFeatures: true` | dev/build pass | 


## Feature

- [x] 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`
- [x] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`
2021-08-13 21:08:45 +00:00
즈눅
1552b8341e
Fix generateBuildId type that can be async function (#28040)
[The current documentation ensures it can be async function](https://github.com/vercel/next.js/blob/v11.1.1-canary.1/docs/api-reference/next.config.js/configuring-the-build-id.md?plain=1#L13), so this PR fixes the TypeScript type of it.
2021-08-12 22:26:44 +00:00
Maia Teegarden
ff5e444284
Use @next scope for native packages (#28046) 2021-08-12 13:59:53 -07:00
Tobias Koppers
8bbb1cd353
use a shared worker pool for collecting page data and static page generation (#27924)
this avoid loading all code twice and hopefully improving performance
2021-08-12 19:54:49 +00:00
stefanprobst
9bf322503b
Add missing fields to NextConfig type (#27974)
This PR adds the `poweredByHeader` and `webpack` fields to the public `NextConfig` type.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-12 15:42:57 +00:00
Tim Neutkens
965a280bc2
Ensure config file message is only shown once (#28017)
Fixes #27982



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## 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.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-12 14:33:25 +00:00
Maia Teegarden
b2c7b316cb
Next swc publish flow (redo) (#27984)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-08-12 12:22:50 +02:00
Tim Neutkens
ebb6a30370 Revert "Add warning during next build when sharp is missing (#27933)"
This reverts commit 51a2a028dd.
2021-08-11 17:47:16 +02:00
Tim Neutkens
8ac3254d25 Revert "Next swc publish flow (#27932)"
This reverts commit 94fc6f0832.
2021-08-11 15:48:15 +02:00
Maia Teegarden
94fc6f0832
Next swc publish flow (#27932) 2021-08-11 11:03:16 +02:00
Steven
51a2a028dd
Add warning during next build when sharp is missing (#27933)
Follow up to #27346 

![image](https://user-images.githubusercontent.com/229881/128935917-ca6da384-91f4-43d3-8059-4e06220fbc19.png)
2021-08-11 04:03:57 +00:00
Tobias Koppers
681d298bdf
update to webpack 5.50.0 (#27929)
* performance improvements for cache serialization
* disabled cache compression by default (next.js is using webpack default again)
* support hashbang
2021-08-10 19:20:50 +00:00