From 60e9ec5f0dd7f727aabde87e62fcdae6cf1d76e0 Mon Sep 17 00:00:00 2001 From: Barinderpreet Singh <64461700+knownasnaffy@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:41:17 +0530 Subject: [PATCH 1/2] docs: update vite installation docs --- apps/www/content/docs/installation/vite.mdx | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/apps/www/content/docs/installation/vite.mdx b/apps/www/content/docs/installation/vite.mdx index 3dcfb4f4f76..4fe41449ac2 100644 --- a/apps/www/content/docs/installation/vite.mdx +++ b/apps/www/content/docs/installation/vite.mdx @@ -23,6 +23,29 @@ npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p ``` +Add this import header in your main css file, `src/index.css` in our case: + +```css {1-3} showLineNumbers +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* ... */ +``` + +Configure the tailwind template paths in `tailwind.config.js`: + +```js {3} +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./src/**/*.{html,js}"], + theme: { + extend: {}, + }, + plugins: [], +} +``` + ### Edit tsconfig.json file The current version of Vite splits TypeScript configuration into three files, two of which need to be edited. From de5df1ee85937d45427bf39de541e361098593dd Mon Sep 17 00:00:00 2001 From: Barinderpreet Singh <64461700+knownasnaffy@users.noreply.github.com> Date: Thu, 5 Sep 2024 06:42:45 +0530 Subject: [PATCH 2/2] Update content config --- apps/www/content/docs/installation/vite.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/www/content/docs/installation/vite.mdx b/apps/www/content/docs/installation/vite.mdx index 4fe41449ac2..ea47ab94a3f 100644 --- a/apps/www/content/docs/installation/vite.mdx +++ b/apps/www/content/docs/installation/vite.mdx @@ -38,7 +38,10 @@ Configure the tailwind template paths in `tailwind.config.js`: ```js {3} /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./src/**/*.{html,js}"], + content: [ + "./src/**/*.{ts,tsx,js,jsx}", + "./index.html" + ], theme: { extend: {}, },