Blog

Install Tailwindcss in Svelte with 1 command

Stop using the 5 step method and remember the npx command to install tailwind.

Install Tailwindcss in Svelte with 1 command

Here is how to install Tailwindcss in Svelte

PortableText [components.type] is missing "code"

Yep thats it you don’t need anything else :D

Okay so what does this actually do?

PortableText [components.type] is missing "image"

Update ./package.json

Includes the required development packages.

PortableText [components.type] is missing "code"

Add ./tailwind.config.json

Adds the correct configuration for Tailwind, which adds all of the necessary content file types.

PortableText [components.type] is missing "code"

Update ./svelte.config.js

Updates to add the preprocess requirement.

PortableText [components.type] is missing "code"

Add ./postcss.config.cjs

PortableText [components.type] is missing "code"

Add ./src/app.postcss

Includes the global files

PortableText [components.type] is missing "code"

Add ./src/routes/+layout.svelte

PortableText [components.type] is missing "code"