Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

tailwind vue

npm i -D tailwindcss@latest postcss@latest autoprefixer@latest

npx tailwindcss init -p

# inside tailwind.config.js 
mode: "jit", 
purge: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}']

# creates src/index.css and then import it into src/main.js
echo -e "@tailwind base; 
@tailwind components; 
@tailwind utilities;" >> src/index.css

# src/main.js
import './index.css'
Source by tailwindcss.com #
 
PREVIOUS NEXT
Tagged: #tailwind #vue
ADD COMMENT
Topic
Name
3+3 =