Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Woodruff a7c56a5b6b fix(turbopack-ecmascript-plugins): Accept a partial object for StyledComponentsTransformConfig (#69474)
`StyledComponentsTransformConfig` should've used `#[serde(default)]` to
allow the user to provide a partial object with only some of the fields.

https://serde.rs/container-attrs.html#default

> When deserializing, any missing fields should be filled in from the
struct's implementation of `Default`. Only allowed on structs.

Without that, when serde tries to deserialize, it is expecting that the
object has all of it's fields filled in, and breaks because you've only
got two of them. The test suite only ever tested `styledComponents:
true` (not using an object), so it missed this.

## Test Plan

```
pnpm swc-build-native
TURBOPACK=1 TURBOPACK_DEV=1 pnpm test test/development/basic/styled-components
```
2024-08-29 16:41:31 -07:00
Leah 95449e6632 feat: enable styled-components css prop swc transform by default (#37962) 2022-06-23 18:08:22 +00:00
Leah 7c20918bc7 feat: enable configuration of styled-components transform and enable css prop support (#37861)
This allows configuring / overriding the default options of the `styled-components` swc transform and allows using the `css` prop support, which was already implemented, but not available.

Edit: made the CSS prop transform run before the display name, so it gets picked up by that and receives the (deterministic) name.

Relates to #30802
2022-06-23 16:55:05 +00:00
JJ Kasper 4a7ab34baf Update repo to use react 18 by default (#35888)
This updates our `yarn next` command to leverage react v18 by default and removes the need for the test require hook/config modifying when testing react 18. There are some fixtures we need to investigate react 18 support in follow-ups:

- `test/integration/client-navigation-a11y`
- `test/integration/critical-css`
- `test/integration/custom-error-page-exception`
- `test/integration/font-optimization`
- AMP specific tests
2022-04-05 21:51:47 +00:00
Shu Ding 600e0b3e4e Fix _document and getInitialProps with React 18 (#35736)
* wip

* update test

* fix _document logic for edge runtime and rsc

* revert deleted file

* fix lint error

* fix

* remove doc gip test

* Revert "remove doc gip test"

This reverts commit a5fd1d7e58.

* fix test

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2022-03-30 11:10:48 -05:00
Maia Teegarden 01ee7e0b22 Chore/stable swc compiler options (#34074)
Mark some previously experimental swc compiler options as stable under a new `compiler` option

## 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-02-10 01:54:28 +00:00
Donny/강동윤 54ca8f41ce next-swc: Add displayNameAndId of styled-components (#31189)
## 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`




Related to: https://github.com/vercel/next.js/issues/30802
2021-11-09 10:05:31 +00:00