sveltejs / svelte-preprocess

A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
MIT License
1.76k stars 151 forks source link

Doesn't work with postcss when configuration is inline instead of postcss.config.cjs #516

Closed felixsanz closed 2 years ago

felixsanz commented 2 years ago

If you try to use the inline config like:

sveltePreprocess({
  postcss: {
    plugins: [
        nesting,
        customMedia,
        autoprefixer,
    ],
  },
}),

This library does not work. Importing a CSS file inside <script> or inside <style> (using @import)... nothing is processed. Only works if you inline the CSS directly in the style tag, but obviously is scoped so... basically nothing works.

What i'm doing wrong? I want to have my CSS in a separate file and have it processed with postcss without having a postcss.config.cjs

felixsanz commented 2 years ago
Githubissues.
  • Githubissues is a development platform for aggregating issues.