diff --git a/docs/preprocessors/other-css-preprocessors.md b/docs/preprocessors/other-css-preprocessors.md index a80606792..6ddbbf9cf 100644 --- a/docs/preprocessors/other-css-preprocessors.md +++ b/docs/preprocessors/other-css-preprocessors.md @@ -2,14 +2,26 @@ The svelte-language-server and therefore the VSCode extension can only handle CSS/Less/SCSS syntax. To get other syntaxes working, read on. +## PostCSS + +1. Setup you build and `svelte.config.js` ([general info](./in-general.md)) correctly and add a `postcss.config.js`. We recommend using [svelte-preprocess](https://github.com/sveltejs/svelte-preprocess/blob/master/docs/preprocessing.md#postcss). For the `svelte.config.js`, this should be enough: +```js +const sveltePreprocess = require('svelte-preprocess'); +module.exports = { preprocess: sveltePreprocess({ postcss: true }) } +``` +Note that within your config files you can only use node-syntax, things like `import ...` or `export const ...` are not allowed. + +2. Either add `lang="postcss"` to each of your `