Skip to content

plugin-react-oxc@0.3.0

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Jul 03:34
· 159 commits to main since this release
plugin-react-oxc@0.3.0
1b4e0f0

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' }))