fix(turbopack-ecmascript-plugins): Accept a partial object for…
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 ```
Showing
Please
register
or
sign in
to comment