Vite
Start using Wedges with Vite.
Create Project
Begin by initializing a new project with Vite:
Then follow the prompts to create a React project. Typescript is recommended but not required. Once the installation is complete, run the following command to navigate to your project directory:
Ensure to replace my-vite-app
with the actual name you chose for your project during installation.
Install Wedges
Install Tailwind CSS
By default, Vite doesn’t install Tailwind CSS, so we’ll need to do that manually.
More information can be found in the official Tailwind CSS installation guide.
Let’s start by installing the Tailwind CSS and its peer dependencies:
Then generate your tailwind.config.js
and postcss.config.js
files by running the following command:
Configure Tailwind CSS
Once Tailwind CSS is installed, update tailwind.config.js
file to add the necessary configuration for Wedges:
Setup pnpm (optional)
If you’re using pnpm, add the following line to your .npmrc
file:
This ensures that pnpm correctly handles dependencies for Wedges, allowing necessary packages to be accessible at the top level of your node_modules.
After updating, run pnpm install
again to reconfigure your dependencies correctly.
That’s all
You can now start using the components in your application.