From 3d1bc758207b134de6f2514f69ddfdbd1253eee2 Mon Sep 17 00:00:00 2001 From: sadeghbarati Date: Sat, 20 Apr 2024 11:33:22 +0330 Subject: [PATCH] chore: update --- .../www/src/content/docs/installation/vite.md | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/apps/www/src/content/docs/installation/vite.md b/apps/www/src/content/docs/installation/vite.md index b46ded0e..7bf850fc 100644 --- a/apps/www/src/content/docs/installation/vite.md +++ b/apps/www/src/content/docs/installation/vite.md @@ -9,6 +9,12 @@ description: Install and configure Vite. Start by creating a new Vue project using `vite`: + + + If you're using the JS template, `jsconfig.json` must exist for the CLI to run without errors. + + + ```bash # npm 6.x npm create vite@latest my-vue-app --template vue-ts @@ -24,12 +30,18 @@ Install `tailwindcss` and its peer dependencies, then generate your `tailwind.co - Vite already has [`postcss`](https://github.com/vitejs/vite/blob/main/packages/vite/package.json#L78) dependency so you don't have to install it again in your package.json + Vite already has [`postcss`](https://github.com/vitejs/vite/blob/main/packages/vite/package.json#89) dependency so you don't have to install it again in your package.json ```bash npm install -D tailwindcss autoprefixer ``` + + + If you're utilizing `postcss.config.js`, these changes will be inconsequential. + + + #### `vite.config` ```typescript {5,6,9-13} @@ -77,9 +89,9 @@ Install `tailwindcss` and its peer dependencies, then generate your `tailwind.co -### Update tsconfig.json +### Edit tsconfig/jsconfig.json -Add the code below to the compilerOptions of your tsconfig.json so your app can resolve paths without error +Add the code below to the compilerOptions of your `tsconfig.json` or `jsconfig.json` so your app can resolve paths without error ```json {4-7} { @@ -158,11 +170,11 @@ Configure the import alias for utils: › @/lib/utils Remove import for style.css and add add tailwind style import `import './assets/index.css'` -```typescript {4} +```diff typescript {4} import { createApp } from 'vue' -~~import './style.css'~~ +- import './style.css' import App from './App.vue' -import './assets/index.css' ++ import './assets/index.css' createApp(App).mount('#app') ```