Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find postcss config file #298

Closed
RedHatter opened this issue Jan 18, 2021 · 3 comments
Closed

Can't find postcss config file #298

RedHatter opened this issue Jan 18, 2021 · 3 comments
Assignees
Labels
invalid This doesn't seem right

Comments

@RedHatter
Copy link

Example repo

I can't get svelte-preprocess to find a PostCSS config file.

With just

sveltePreprocess()

PostCSS is not processed at all. With

sveltePreprocess({
  postcss: {}
})

PostCSS is ran but I get the erorr message

[svelte-preprocess] PostCSS configuration was not passed. If you expect to load it from a file make sure to install "postcss-load-config" and try again.

Even though postcss-load-config is installed. With

sveltePreprocess({
  postcss: {
    plugins: [ ... ]
  }
}),

everything works as expected but I would like to define an external PostCSS config file.

@kaisermann
Copy link
Member

Hey @RedHatter, set it to true and you should be good to go! See it here in the docs: https://github.com/sveltejs/svelte-preprocess/blob/main/docs/preprocessing.md#postcss-sugarss

@kaisermann kaisermann self-assigned this Jan 18, 2021
@kaisermann kaisermann added the invalid This doesn't seem right label Jan 18, 2021
@RedHatter
Copy link
Author

Thank you for the quick reply @kaisermann.

I tired you solution but it doesn't seem to work. I still get

PostCSS configuration was not passed. If you expect to load it from a file make sure to install "postcss-load-config" and try again.

See updated repo.

@kaisermann
Copy link
Member

kaisermann commented Jan 21, 2021

I think you're missing a . dot at the beginning of the filename. postcssrc.json should be .postcssrc.json

edit: even so, seems to not work. will check it

edit2: you're missing the sugarss dependency. The error was omitted, but it's fixed in 4.6.3 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants