Skip to content
This repository was archived by the owner on Apr 19, 2021. It is now read-only.
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Bug using svelte-check when having tailwind's experimental features turned on #18

@Evertt

Description

@Evertt

If you write export const experimental = "all" in tailwind.config.js then you get a huge upgrade to the @apply rule. Namely then you can suddenly write @apply hover:bg-red-200, which you couldn't do before.

Unfortunately however, with how this template is currently set up svelte-check will complain that that is not valid syntax. The reason for that is that svelte.config.js doesn't actually use postcss.config.js and therefor it doesn't use tailwind.config.js and therefor svelte-check is not aware that tailwind's experimental feature has been turned on.

I've been able to fix it in my own repo. It wasn't quite as simple as just requiring postcss.config.js, because all those other config files were written in ES6 format, while svelte.config.js was written in Node format and that makes it impossible to use require(). So I had to convert all those config files to Node format.

Right now I'm a bit too lazy to open a PR, but here's the commit in which I fixed the problem for myself. One extra benefit of how I have it now, is that svelte.config.js is the one and only source of truth regarding preprocessing configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestupstreamThis can only be solved by an upstream project's changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions