nx/packages/vite/docs/init-examples.md
2023-01-30 19:41:11 -05:00

1.1 KiB

This is a generator will initialize Vite.js in your workspace. It will install all the necessary dependencies. You can read more about how this generator works, in the Vite package overview page.

{% callout type="note" title="string" %} You don't need to use this generator on its own. {% /callout %}

This generator will be called automatically when you are either converting an existing React or Web app to use Vite, using the @nrwl/vite:configuration generator, or when you are creating a new React or Web app using the @nrwl/react:app or @nrwl/web:app generators, if you choose vite as the bundler.

If you need to for some reason, you can use it on its own like this:

nx g @nrwl/vite:init

Examples

Install all the necessary dependencies for Vite and the React plugin

nx g @nrwl/vite:init --uiFramework=react

Install all the necessary dependencies for Vite

nx g @nrwl/vite:init --uiFramework=none