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

PostCSS config not being loaded #216

saaduw opened this issue Aug 10, 2020 · 1 comment

PostCSS config not being loaded #216

saaduw opened this issue Aug 10, 2020 · 1 comment


Copy link

@saaduw saaduw commented Aug 10, 2020

Describe the bug
Working on a Electron project (using Svelte) + TailwindCSS with the help of PostCSS. (Used the guidelines here to get Tailwind working with Svelte:

Everything was working perfectly until today when I could no longer build the electron app (npm start). The postcss.config.js file exists in the root of the project as does the svelte.config.js

The postcss-load-config is also correctly installed as a dev dependency.

The only conceivable change made to my dev environment in the past month has been updating my MacOS to 10.15.6

const sveltePreprocess = require('svelte-preprocess');

module.exports = {
	preprocess: sveltePreprocess({
    scss: {
      data: `@import 'src/assets/styles/_base.scss';`
    postcss: true
const purgecss = require('@fullhuman/postcss-purgecss')({
  content: [

  whitelistPatterns: [/svelte-/],

  defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []

const production = process.env.NODE_ENV === 'production'

module.exports = {
  plugins: [
    ...(production ? [purgecss] : [])


[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 ʕ•ᴥ•ʔ

Expected behavior
To be able to build my electron app with the styles correctly applied.

Information about your project:

  • Your browser and the version: Electron 8.4.1

  • Your operating system: MacOS 10.15.6

  • Node version: 13.5.0

  • svelte-preprocess version: 3.9.12

  • Whether your project uses Webpack or Rollup: Neither. We use Parcel

Copy link

@kaisermann kaisermann commented Sep 25, 2020

Hey @saaduw 👋 svelte-preprocess was accidentally suppressing all kinds of errors and displaying that message. I've changed this behavior in 4.3.2 and, if the issue still exists, you should be able to see the correct error appearing.

@kaisermann kaisermann self-assigned this Sep 25, 2020
@kaisermann kaisermann added the bug label Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.