plugin-react-oxc@0.3.0
·
159 commits
to main
since this release
Add HMR support for compound components (#518)
HMR now works for compound components like this:
const Root = () => <div>Accordion Root</div>
const Item = () => <div>Accordion Item</div>
export const Accordion = { Root, Item }
Return Plugin[]
instead of PluginOption[]
(#537)
The return type has changed from react(): PluginOption[]
to more specialized type react(): Plugin[]
. This allows for type-safe manipulation of plugins, for example:
// previously this causes type errors
react()
.map(p => ({ ...p, applyToEnvironment: e => e.name === 'client' }))