DEV Community

Discussion on: [Update] Using Svelte with Tailwindcss - A better approach

Collapse
 
city41 profile image
Matt Greer

Thanks for making these templates. I noticed after switching the sapper template to typescript with node scripts/setupTypeScriptRollup.js,Tailwind stopped working. The TS script creates some conflicts in rollup.config.js. They are easy to fix though.

  1. remove the extra sveltePreprocess import
  2. in both client and server, in the svelte() call, remove the extra preprocess: sveltePreprocess() lines that got added

I am brand new to Svelte, so might have something wrong, but this seemed to both get me TypeScript and Tailwind.

Collapse
 
sarioglu profile image
sarioglu

Thank you Matt! I've noticed this issue. scripts/setupTypeScriptRollup.js does not check if there is an existing sveltePreprocess. So it results with a silent failure. Your fix is correct. I am going to examine the script deeper to find a solution.