Related plugins
Describe the bug
@swc/core doesn't follow semver but vite-plugin-react is using caret version.
This could silently break when plugin-react-swc is packaged together with swc plugins.
For example, @swc/core@1.13.5 is only compatible with @swc/plugin-emotion@^11
(https://plugins.swc.rs/versions/range/426)
but the caret ^1.13.5 installs latest version on fresh install which breaks plugin compatibility.
To fix this we have to override the version or modify the lockfile manually which is not a great experience.
There could be two options:
- fix the version
- make it as a peer dependency
I think latter one makes more sense since swc's javascript interface is mostly consistent.
Related code
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc/package.json
Used Package Manager
yarn
Logs
No response
Validations
Related plugins
plugin-react
plugin-react-swc
plugin-react-oxc
plugin-rsc
Describe the bug
@swc/core doesn't follow semver but vite-plugin-react is using caret version.
This could silently break when plugin-react-swc is packaged together with swc plugins.
For example,
@swc/core@1.13.5is only compatible with@swc/plugin-emotion@^11(https://plugins.swc.rs/versions/range/426)
but the caret
^1.13.5installs latest version on fresh install which breaks plugin compatibility.To fix this we have to override the version or modify the lockfile manually which is not a great experience.
There could be two options:
I think latter one makes more sense since swc's javascript interface is mostly consistent.
Related code
https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc/package.json
Used Package Manager
yarn
Logs
No response
Validations