You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.nx g @nx/react:library --verbose --name swclib --bundler none --linter none --unit-test-runner vitest --compiler swc
2. in vite.config.ts the import is import react from "@vitejs/plugin-react"; instead of import react from "@vitejs/plugin-react-swc";
## Current Behavior
see #27433
## Expected Behavior
see #27433
## Related Issue(s)
see #27433
Fixes #
- if compiler is `swc`, `@vitejs/plugin-react-swc` is being imported;
otherwise `@vitejs/plugin-react` is being imported
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
## Current Behavior
see #27433
## Expected Behavior
see #27433
## Related Issue(s)
see #27433
Fixes #
- if compiler is `swc`, `@vitejs/plugin-react-swc` is being imported;
otherwise `@vitejs/plugin-react` is being imported
Co-authored-by: Emily Xiong <xiongemi@gmail.com>
(cherry picked from commit 7f2c556)
Current Behavior
When generating a library with SWC compiler, the option is ignored if the test runner is vitest.
This happens because of https://github.com/nrwl/nx/blob/master/packages/react/src/generators/library/library.ts#L176
Expected Behavior
import react from "@vitejs/plugin-react-swc";
should be added to
vite.config.ts
instead ofimport react from "@vitejs/plugin-react";
GitHub Repo
No response
Steps to Reproduce
1.
nx g @nx/react:library --verbose --name swclib --bundler none --linter none --unit-test-runner vitest --compiler swc
2. in
vite.config.ts
the import isimport react from "@vitejs/plugin-react";
instead ofimport react from "@vitejs/plugin-react-swc";
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: