matyunya / smelte

UI framework with material components built with Svelte and Tailwind CSS
https://smeltejs.com/
MIT License
1.53k stars 114 forks source link

new project setup broken, can't find tailwind (404) #210

Closed dctalbot closed 3 years ago

dctalbot commented 3 years ago
  Your application is ready~! 🚀

  - Local:      http://localhost:5000
  - Network:    Add `--host` to expose

────────────────── LOGS ──────────────────

  [01:57:59] 200 ─ 3.37ms ─ /
  [01:57:59] 200 ─ 0.59ms ─ /global.css
  [01:57:59] 200 ─ 0.88ms ─ /build/bundle.css
  [01:57:59] 200 ─ 1.72ms ─ /build/bundle.js
  [01:57:59] 404 ─ 0.14ms ─ /build/tailwindcss/base
  [01:57:59] 404 ─ 0.11ms ─ /build/tailwindcss/components
  [01:57:59] 404 ─ 0.10ms ─ /build/tailwindcss/utilities

I'm a bit new to the svelte/rollup space, but I followed the docs pretty straight forwardly and the css isn't being applied. I wonder if a dependency regression was introduced?

Steps to reproduce:

npx degit sveltejs/template my-svelte-project
cd my-svelte-project
npm install
npm install smelte

Add const smelte = require("smelte/rollup-plugin-smelte"); to top of rollup.config.js Add smelte as last plugin in rollup.config.js (see README) Add import "smelte/src/tailwind.css"; Add some example smelte components

npm run dev

See no styles being applied.

micha-lmxt commented 3 years ago

In rollup.config.js put the smelte plugin right after the svelte plugin. Not sure, which plugin interferes, but it is much likely the css plugin. I think the documentation regarding this should be updated.

dctalbot commented 3 years ago

Thanks @micha-lmxt , that solved it!