denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.15k stars 619 forks source link

Tailwind plugin wanders into `scss` files then crashes on build #2420

Closed marcusjang closed 2 months ago

marcusjang commented 4 months ago

When adding included Tailwind plugin to an existing project with sass/scss files in static directory, the plugin on buildStart will walk the static directory in search for css files. However when it bumps into scss files which postcss isn't able to parse, it throws the error below:

error: Uncaught (in promise) CssSyntaxError: <css input>:22:17: Unknown word

Seemingly caused by the line below in the plugin, which matches any files ending with css, including *.scss. Changing exts from "css" to ".css" seemed to solve the issue, but I'm not 100% sure if this was due to a design decision or simply a bug.

https://github.com/denoland/fresh/blob/main/plugins/tailwind.ts#L103

marvinhagemeister commented 2 months ago

Just checked and this is resolved in Fresh 2 which will be released soon.