-
Hi, i want to build react application with preact/compat Here is my config: // rspack.config.ts
export default {
resolve: {
alias: {
react: 'preact/compat',
'react-dom/test-utils': 'preact/test-utils',
'react-dom': 'preact/compat',
'react/jsx-runtime': 'preact/jsx-runtime',
},
},
builtins: {
react: {
pragma: 'h',
pragmaFrag: 'Fragment',
},
// ...some html config here
},
// ...some config here
}; But with this config i get error in browser:
This only happens when using hooks How to solve this issue? |
Beta Was this translation helpful? Give feedback.
Answered by
krutoo
Oct 2, 2023
Replies: 2 comments
-
this seems to be related to this issue preactjs/preact#1321 |
Beta Was this translation helpful? Give feedback.
0 replies
-
the problem was that I was using a local version of the package that uses react via symlink i fix this by install package from tarball generated by |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
krutoo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the problem was that I was using a local version of the package that uses react via symlink
i fix this by install package from tarball generated by
npm pack