-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
v3.0.1 compatibility with React 17.0.2 (Reproducible) #135
Comments
Thanks for opening this @SalahHamza! I'll take a look |
@SalahHamza Can you provide your node.js and OS version too? I haven't tried it locally yet but it works as expected on CodeSandbox https://codesandbox.io/p/sandbox/github/SalahHamza/react-compare-slider-repro/tree/main/ |
@nerdyman thanks for the quick reply. Here you go:
Additional note: I think the main cause of the issue is this:
|
@nerdyman I think the main reason why this is working, is because in the Sandbox it uses Vite, while the repro uses CRA. |
@SalahHamza Thanks for raising this issue. It looks like the error is due to the JSX config used by this lib but I can't change it now as it might break other things. You can use a tool such as CRACO as a workaround. You'll need to do the following to get it working: Install craco: yarn add --dev @craco/craco Create // craco.config.js in the same directory as your package.json
module.exports = {
webpack: {
alias: {
'react/jsx-dev-runtime': 'react/jsx-dev-runtime.js',
'react/jsx-runtime': 'react/jsx-runtime.js',
},
}
} Change the - "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
+ "start": "craco start",
+ "build": "craco build",
+ "test": "craco test", The error looks to be isolated to ES modules and Webpack 5, you can check out facebook/react#20235 for more info. |
Hey! Seems like the react-compare-slider isn't compatible with react 17.0.2.
Error:
Here's the code to the issue:
https://github.com/SalahHamza/react-compare-slider-repro
The text was updated successfully, but these errors were encountered: