DEV Community

Discussion on: Tailwind CSS with Snowpack

fractal profile image

Love this!! Have you ever managed to get this working with snowpack-svelte / rollup?

boywithsilverwings profile image
Agney Menon Author

Things have changed a bit since I wrote this for the new release of TailwindCSS and Snowpack v2.

Here is my latest setup on svelte:

GitHub logo agneym / svelte-tailwind-snowpack

TailwindCSS with Svelte and Snowpack v2

Svelte with TailwindCSS - Snowpack

Community template for Svelte and Tailwind.

npm Twitter Follow

Create a new project with:

npx create-snowpack-app dir-name --template @snowpack/app-template-svelte

Uses svelte-preprocess

Available Scripts

npm start

Runs the app in the development mode. Open localhost:8080 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode. See the section about running tests for more information.

npm run build

Builds a static copy of your site to the build/ folder. Your app is ready to be deployed!

For the best production performance: Add a build bundler plugin like "@snowpack/plugin-webpack" or "@snowpack/plugin-parcel" to your snowpack.config.json config file.

Q: What about Eject?

No eject needed! Snowpack guarantees zero lock-in, and CSA strives for the same.

This is a fork of official template Svelte starter