Commit graph

14 commits

Author SHA1 Message Date
Alex Kirszenberg
7bbc1aec9a
Aggregate updates using addStatusHandler and Promise.resolve instead of setTimeout (#42350)
The current `setTimeout` logic adds a constant overhead of 30ms when applying updates, which slows down HMR. As @sokra suggested, we can use the `addStatusHandler` API to have the HMR runtime let us know when its status changes. This also switches to `Promise.resolve` for update aggregation.
2022-11-07 21:06:18 +00:00
Jiachi Liu
c7d3f9d413
Drop legacy RSC handling in client for pages (#40472)
Remove the unused RSC handling for pages in both server router and client side in favor of using RSC in app dir
2022-09-12 13:15:18 +00:00
Tim Neutkens
4cd8b23032
Enable @typescript-eslint/no-use-before-define for functions (#39602)
Follow-up to the earlier enabling of classes/variables etc.

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 by running pnpm lint
 The examples guidelines are followed from our contributing doc

Co-authored-by: Steven <steven@ceriously.com>
2022-08-15 10:29:51 -04:00
Tim Neutkens
62b1704e41
Add support for "type": "module" in package.json (#33637)
- [x] Add failing test for development / production
- [x] Add failing test for client-side JavaScript
- [x] Write `.next/package.json` with `"type": "commonjs"
- [x] Fix issue with client-side JavaScript showing `module` is not defined

Production works after these changes. Development breaks on module not existing because of the Fast Refresh loader. Working with @sokra to add alternatives to what is being used in the loader to webpack so that it can be updated.

Fixes #23029, Fixes #24334



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] 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 by running `yarn lint`
2022-02-15 16:24:11 +00:00
Balázs Orbán
7e95e30063
fix: allow certain variable names in development (#33638)
Fixes #24570

A few variable names (listed https://github.com/vercel/next.js/issues/24570#issuecomment-828721019) were causing problems when using `next dev`.

## 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 by running `yarn lint`
2022-01-27 14:22:35 +00:00
Shu Ding
5ddee4494b
Add new target for middleware (#30299)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-10-26 18:50:56 +02:00
Tim Neutkens
6f7dfe111c
Make helpers.ts compatible with ie11 (#15973)
Fixes #15680

This does not solve the issue that an error triggered will fail on shadowroots being created, however it does fix the general failure

Closes https://github.com/vercel/next.js/pull/15825
2020-08-07 14:13:24 +00:00
Tim Neutkens
c5e1e48e5a
Replace extra source line in webpack 5 (#14793)
Co-authored-by: Joe Haddad <timer@zeit.co>
Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
2020-07-03 13:30:52 +02:00
Joe Haddad
80036fd9dd
Fix Fast Refresh with Page Config (#14041)
Fixes #13978
2020-06-10 19:56:05 +00:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Joe Haddad
ae1daea355
Enable Fast Refresh by Default (#12640) 2020-05-10 19:25:57 -04:00
Joe Haddad
92ad5c0bf0
[Fast Refresh] Support client-side code being ran in Node (#12426) 2020-05-03 19:56:51 -04:00
Joe Haddad
42daf7f47c
Upgrade source-map package (#12355)
* Abort after 10s instead of 3s while testing

* skip tests to unlock CI

* re-enable tests

* fix

* Catch `performReactRefresh` errors
2020-04-30 13:13:40 -04:00
Joe Haddad
ec3f8e5815
Create React Refresh Utils (#12006)
* Create React Refresh Utils

* Fix Linting

* Update Prettier Ignore

* fix rules
2020-04-18 13:55:10 -04:00