svelte-rollup-postcss-tailwind

Svelte Rollup Postcss Tailwind

A Web UI starter using Svelte with Rollup, PostCSS and Tailwind CSS

A Svelte + Rollup + PostCSS + Tailwind CSS starter

This is a starter for a Web UI project that uses:

  • the lovely Svelte JS framework
  • with the efficient rollup.js module bundler
  • and PostCSS tool for optimizing the CSS result
  • and the absolutely gorgeous Tailwind CSS framework

All the instructions below consider pnpm tool, instead of the classic NPM, again, just from an efficient point of view.


Setup

pnpm i to install the dependencies.

Running in Dev mode

Run in development mode using pnpm run dev or the included run_dev.sh script.

Navigate to localhost:5000 to access the app.


Building and Running in Production mode

Use pnpm run build to create an optimised version of the app, ready to be deployed.

Use pnpm run start to run the newly built app.


Single-page app (SPA) mode

By default, sirv will only respond to requests that match files in public. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.

If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for any path. You can make it so by editing the "start" command in package.json:

"start": "sirv public --single"

Top categories

Loading Svelte Themes