Skip to content

Merge options: css + emitCss #146

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

Closed
lukeed opened this issue Oct 22, 2020 · 0 comments · Fixed by #147
Closed

Merge options: css + emitCss #146

lukeed opened this issue Oct 22, 2020 · 0 comments · Fixed by #147

Comments

@lukeed
Copy link
Member

lukeed commented Oct 22, 2020

While working on #145 (and previously too, tbh) I feel like it might make more sense to consolidate emitCss and css into one option.

It could be a single extractCss option.

  • false – sets compilerOptions.css: false, resulting in inlined CSS
  • true – similar to emitCss: true1
  • function – sets compilerOptions.css: false, and uses custom CssWriter to produce a single CSS output.

Prior Art

This would follow what rollup-plugin-postcss has been doing, and feels very intuitive. We can follow it more closely, and allow boolean | string values only, where string uses a CssWriter function internally (the 90% default anyway).

1 Our emitCss should be emitting CSS files individually only. Right now, they're given importd lines but are still concatenated into the single file that CssWriter produces anyway (bug).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant