Commit graph

1291 commits

Author SHA1 Message Date
Jan Nicklas
31a701b9da
feat(jsconfig-paths-plugin): Resolve paths synchronously (#29467) 2021-10-13 12:17:54 +02:00
Donny/강동윤
7b3cce3f94
Update swc (#29843)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-12 16:43:45 +02:00
Steven
cc1f3b8a38
Add support for AVIF to next/image (#29683)
Add support for AVIF to `next/image`

- Fixes #27882 
- Closes #27432 

## Feature

- [x] Implements an existing feature request
- [x] Related issues linked
- [x] Integration tests added
- [x] Documentation added
- [x] Update manifest output
- [x] Warn when `sharp` is outdated
- [x] Errors & Warnings have helpful link attached
- [ ] Remove `image-size` in favor of `squoosh`/`sharp` (optional, need to benchmark)
2021-10-11 23:17:47 +00:00
Keen Yee Liau
13f68debfe
Collect feature usage for optimizeCss (#29828)
`optimizeCss` is a feature that inlines critical CSS using critters.
The Aurora team would like to gauge adoption rate for this feature.



## Bug

- [ ] Related issues linked using `fixes #number`
- [x] 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`
- [x] Integration tests added
- [ ] Documentation added
- [x] 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-10-11 21:15:18 +00:00
Tobias Koppers
e679f5b7d1
allow to reload disposed client pages (#29815) 2021-10-11 20:36:01 +02:00
Tobias Koppers
7a38bbb4d9
add summary logging option (#29814) 2021-10-11 19:31:12 +02:00
Tim Neutkens
e7f503abd3
Pass sourcemap when swcMinify is enabled (#29794) 2021-10-11 10:57:21 +02:00
Donny/강동윤
bcb8e44b7e
Update swc (#29798)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-11 10:55:59 +02:00
Tobias Koppers
87d0fc9fd7
avoid using absolute paths in import/require (#29797)
Using absolute paths leads to unnecessary watched paths and tested paths for resolving
2021-10-11 08:52:59 +00:00
Tobias Koppers
77b65327cf
show partial compiled message and correct module count (#29795)
```
event - compiled successfully in 4.1s (1597 modules)
event - compiled client successfully in 271 ms (1076 modules)
```

instead of

```
event - compiled successfully in 4.1 s (1597 modules)
event - compiled successfully in 271 ms (1708 modules)
```

* spacing for seconds
* module count only counts modules from compilers that were running
* add a note to message when only one compiler had something to do
2021-10-11 08:14:52 +00:00
Donny/강동윤
2874791ab1
Fix styled-jsx: Don't drop extra selectors (#29791)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-11 08:36:23 +02:00
Donny/강동윤
99fed15b8b
Update test refs (#29776) 2021-10-10 10:36:43 -05:00
Donny/강동윤
2cd52aed26
Fix bugs of styled-jsx and swc (#29774)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-10 12:46:44 +02:00
Donny/강동윤
f1c62d5073
feat(build/swc): Add debug utilities (#29730)
* Make debug build faster

* Organize for easier testing

* Add example tests

* Test system

* Update test refs

* Ensure that we are fully processing

* Update test refs

* Update test system

* Update swc

* Fix

* Update test refs

* Update test refs

* Ignore tests in nextbuild task

* Fix attrs

* Add a test

* Update test refs

* Add a test

* Fix hygiene bug

* Update test refs

* Update swc

* Build next-swc binaries

Co-authored-by: Tim Neutkens <timneutkens@me.com>
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-10 07:25:15 +02:00
Tim Neutkens
628bb397b3
Fix bug with getServerSideProps when swcLoader is enabled (#29760)
Ported from #29185

These are all related to `swcLoader`:
- Fixes commonjs code being output as ESM
- Fixes bug with `getServerSideProps` not getting querystrings and added tests for it
- Disable SWC on Babel test suites
- Disable SWC on no-anon-default-export test suite
- Disable SWC on page-config test suite (pending porting of the Babel plugin)
- Ensure `sourcesContent` is part of the sourcemap



## 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-10-09 14:39:53 +00:00
Tim Neutkens
a7932cbb6c
Add trace span for module readFile (#29759) 2021-10-09 13:18:58 +02:00
Tobias Koppers
3e22b22afc
Hmr DX improvements (#29753) 2021-10-09 11:51:37 +02:00
Maia Teegarden
3e3f09f4e1
Use correct arg for require.resolveWeak (#29719)
* Use correct arg for require.resolveWeak

* Build next-swc binaries
2021-10-07 17:02:13 -07:00
Donny/강동윤
0a803bafcd
fix(styled-jsx): Use correct SyntaxContext for identifiers (#29705)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
2021-10-07 18:17:29 +02:00
Donny/강동윤
ac187a5b43
chore: Update swc (#29689)
Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
2021-10-07 12:11:53 +02:00
Tim Neutkens
351d225fc5
Remove isWebpack5 checks (#29677)
* Remove isWebpack5 checks

* Remove next-babel-loader (replaced by babel-turbo-loader), hotSelfAccept, and BuildStatsPlugin

* Remove cacache file

* Remove unused variable

* remove old test

* lint-fix

* update babel-loader tests

* lint-fix

* update compiled

Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-06 18:46:46 -05:00
Maia Teegarden
d1308b8ab0
Chore/update swc (#29675)
* Update swc deps

* Build next-swc binaries
2021-10-06 10:16:27 -07:00
JJ Kasper
a20b0d59f5
Ensure conditional resolve alias does not affect server (#29673)
This ensures we don't add the no-op resolve alias when rewrites aren't used for the server resolving since it is still needed while tracing server files. 

## 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/pull/25538#issuecomment-936101951
2021-10-06 17:16:01 +00:00
Tim Neutkens
aa8a885599
Remove webpack 4 support (#29660)
Co-authored-by: jj@jjsweb.site <jj@jjsweb.site>
2021-10-06 17:40:01 +02:00
Jonathan Wu
affbc15898
Fix conflicting paths grammar (#29658) 2021-10-05 22:22:46 -05:00
Keen Yee Liau
53628fba69
Create TelemetryPlugin for collecting feature usage metrics (#29145)
This commit creates a new Webpack `TelemetryPlugin` to gather information
about usage of certain features, for example `next/image` and `next/script`.
2021-10-05 14:31:48 -05:00
JJ Kasper
ebc1b0e559
Fix missing trace items and migrate required files test (#29649) 2021-10-05 13:52:19 -05:00
Donny/강동윤
ce73df8d59
Update swc crates (#29643)
* Update deps

* Update

* Build next-swc binaries

Co-authored-by: kdy1 <kdy1@users.noreply.github.com>
Co-authored-by: Maia Teegarden <dev@padmaia.rocks>
2021-10-05 10:21:11 -07:00
Tim Neutkens
f74ee78c3d
Add trace file for "next dev" (#29633)
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
2021-10-05 12:52:45 +02:00
Tobias Koppers
15822516e7
fixes #29553 (#29611)
fixes #29553

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
2021-10-04 23:57:27 +00:00
Maia Teegarden
92c2dd4971
Upgrade swc deps (#29620)
* Upgrade swc deps

* Build next-swc binaries
2021-10-04 14:28:04 -07:00
Donny/강동윤
b701d018f2
Update swc_css_parser (#29572) 2021-10-03 17:29:22 +02:00
Maia Teegarden
260e0e44f6
Include param vars in nearest scope bindings (#29536)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-10-03 17:26:27 +02:00
JJ Kasper
458e34d680
Ensure all package.json files are traced correctly (#29539)
This fixes cases where not all `package.json`s were being added to the traces correctly while using webpack's resolving with the `outputFileTracing`. The specific case notice while testing has been added as an integration test to ensure it is working as expected.
2021-10-01 10:45:10 +00:00
Maia Teegarden
d3b8d708af
Upgrade swc deps (#29531)
* Upgrade swc deps

* Build next-swc binaries

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2021-09-30 14:21:19 -07:00
Jackson Hardaker
ffd88aa739
Fix custom app file regex (#29525)
* Add lodash.escaperegexp

* Add compiled lodash.escaperegexp

* Refactor to escape special characters

* Test for build paths containing a special character

* Replace lodash.escaperegexp with previously compiled dep

* Revert yarn.lock change

* Remove backslash replace

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* lint-fix

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-09-30 16:10:20 -05:00
Maia Teegarden
950ef1a5b5
Fix root global jsx style (#29505)
* Fix root global jsx style

* Build next-swc binaries

* Prettier fix

* Build next-swc binaries
2021-09-30 13:11:03 -07:00
JJ Kasper
8ee6127812
Update resolve options for nft (#29524)
Follow-up to https://github.com/vercel/next.js/pull/29473 after additional testing it seems we need to ensure the `main` field is used when tracing packages during builds so that `module` isn't being used unexpectedly.
2021-09-30 17:03:42 +00:00
Tobias Koppers
59b6967e00
make client and server independent for on-demand-entries (#29518)
allow to dispose server while client is making changes
allow to dispose other entries while making changes
avoid recompiling when disposing entries



## 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-30 13:52:26 +00:00
Maia Teegarden
5778f9ffb3
Remove error that is too strict in next/dynamic swc transform (#29511) 2021-09-30 08:18:45 +02:00
JJ Kasper
38ac55dd20
Update output tracing resolving (#29473) 2021-09-29 12:38:21 -05:00
Tim Neutkens
47a905b855
Invalidate webpack cache when swc options are enabled/disabled (#29497)
Ensures webpack caching is invalidated when switching between SWC on/off.

## 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-29 15:55:15 +00:00
Donny/강동윤
90a33e7994
Update css parser (#29484)
Co-authored-by: timneutkens <timneutkens@users.noreply.github.com>
2021-09-29 11:09:33 +02:00
JJ Kasper
a71addf2e4
Ensure initial imports are included in traces correctly (#29437) 2021-09-28 12:04:16 -05:00
JJ Kasper
f49ff1fbcb
Fix SWC unit test (#29466) 2021-09-28 11:03:54 -05:00
Donny/강동윤
b4d6e535a8
Update swc (#29460) 2021-09-28 15:31:14 +02:00
JJ Kasper
7bbaff74c4
Ensure blurDataURL is correct in dev with basePath (#29436)
Follow-up to https://github.com/vercel/next.js/pull/29307 this ensures the `blurDataURL` is correctly prefixed with the `basePath` in development since we use the `_next/image` endpoint to generate the placeholder in dev mode. 

## 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/29289#issuecomment-927758204
2021-09-27 21:13:23 +00:00
Tim Neutkens
ace8963df2
Remove inline-source-map for Windows (#28893)
## 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-27 12:04:40 +00:00
Tobias Koppers
0976ce2ff0
upgrade webpack and enable experiments.cacheUnaffected (#29369) 2021-09-24 20:45:33 +00:00
Tobias Koppers
5c8bf8fc30
enable unsafeCache for better incremental build performance (#29175) 2021-09-24 22:04:22 +02:00