-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@preact/signals-react-transform
ignoring .tsx
files
#563
Comments
Hmm, that's odd, are you using any special babel rules/transforms? https://github.com/preactjs/signals/blob/main/packages/react-transform/src/index.ts#L545-L550 all it looks for is an element/fragment |
As you only mention If so, the problem is likely an ordering problem, and you've told your TS Babel plugin to transpile JSX. You'll need to persist the JSX for this plugin. |
Can you provide order of babel plugins in your config? |
Hey guys, thanks for the response! Darned timezones... Here's my {
"presets": [
["@babel/preset-env", { "targets": { "node": "current" } }],
["@babel/preset-react", { "runtime": "automatic" }],
"@babel/preset-typescript"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": true }],
"@babel/plugin-transform-class-properties",
"module:@preact/signals-react-transform",
"babel-plugin-styled-components"
]
}
@rschristian - you're right, it's working perfectly fine for {
"compilerOptions": {
"jsx": "preserve",
// ...otherCompilerOptions
},
// ...otherOptions
}
|
Hello, the babel transform modules seems to evaluate all of my
.tsx
files ashasJSX: false
for some reason.Is there anywhere I should check with my configuration?
Example of
SomeComponent.tsx
:To add more information: I'm using babel + webpack to transpile a project with a mixture of JS/JSX/TS/TSX files
Currently using
/** @useSignals */
to manually force the transformation, but would be great to better understand what's going on - not sure where to start.The text was updated successfully, but these errors were encountered: