Skip to content

React-compiler not working with 'module:@preact/signals-react-transform' #652

Closed
@mendrik

Description

@mendrik
  • Check if updating to the latest version resolves the issue

Environment

  • I am using @preact/signals-core
  • I am using @preact/signals
  • I am using @preact/signals-react
  • I understand usage changed in v2, and I've followed the React Integration instructions

Describe the bug

plugins: [
		tsconfigPaths(),
		react({
			babel: {
				plugins: [
					['module:@preact/signals-react-transform'],
					['babel-plugin-react-compiler', { transform: 'preact' }]
				]
			}
		})
	] as ViteUserConfig['plugins'],

To Reproduce
React compiler and @preact/signals-react-transform don't play nice together. It doesn't matter in which order they are added to vite config.

Steps to reproduce the behavior:

It seems like there is no reactivity: changes to values in signals don't re-render the component any longer

Expected behavior
Well I would expect them to be disjunct in their functionalities. But it seems one breaks the other.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions