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.73k stars 147 forks source link

🟧 svelte-package + postcss to preprocess `package` for production ∕ npm publishing ? #565

Open oneezy opened 1 year ago

oneezy commented 1 year ago

I have a svelte lib setup and am using svelte-package + tailwindcss + postcss to create a component package lib folder for publishing to npm.

when i run pnpm package the package folder is automatically created with the contents:

  package/
  ├── components/
  │   ├── Button.svelte
  │   └── Button.svelte.d.ts
- ├── styles.postcss
  ├── index.js
  ├── index.d.ts
  └── package.json

But that styles.postcss isn't processed or minified for production and I'm really not sure what best option is.

What are my options?