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
vite & react generators that allow choosing a compiler/transpiler.
choosing between babel and swc. when choosing babel the react plugin will be the default @vitejs/plugin-react
but when choosing swc, the react plugin will be imported from @vitejs/plugin-react-swc
Motivation
two main reasons:
swc is faster and we want our app to go brrrr
when choosing swc currently as the compiler when generating a react app, together with the vite bundler option, it adds both vite and swc-loader to the packages json even though we aren't using webpack. this elongates our npm i times for nothing.
Suggested Implementation
adding a compiler option to the @nx/vite generator schema and changing the reactPluginImportLine from the generator-utils .ts file according to the user's input.
The text was updated successfully, but these errors were encountered:
Description
vite & react generators that allow choosing a compiler/transpiler.
choosing between babel and swc. when choosing babel the react plugin will be the default
@vitejs/plugin-react
but when choosing swc, the react plugin will be imported from
@vitejs/plugin-react-swc
Motivation
two main reasons:
npm i
times for nothing.Suggested Implementation
adding a compiler option to the
@nx/vite
generator schema and changing thereactPluginImportLine
from the generator-utils .ts file according to the user's input.The text was updated successfully, but these errors were encountered: