question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Optional StyleInject — just the compiled CSS as an output

See original GitHub issue

I’m trying to use this plugin to compile the styles of a Web Component.

These are the relevant bits of code in the JS entry point:

import styles from './styles.css';
// ...
template.innerHTML = `<style>${styles}</style> ${html}`;

As you can see, I just need the imported styles to be the compiled CSS string, but so far I haven’t managed to get rid of the call to the __$styleInject function.

Is there a way to obtain, as an output, just the processed CSS string?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
egoistcommented, Jan 12, 2018

Fixed in v1.0.5

2reactions
lmihaidanielcommented, Jan 9, 2018

that will do, was next on my to-do list

Read more comments on GitHub >

github_iconTop Results From Across the Web

rollup-plugin-postcss - npm
Seamless integration between Rollup and PostCSS. ... Breaking change: v3.0 only support rollup v2, and the extract path based on bundle root ...
Read more >
egoist/rollup-plugin-postcss (Raised $0.00) - Issuehunt
ESM library generated with rollup-plugin-postcss throws Cannot find module '../node_modules/style-inject/dist/style-inject.es.js'.
Read more >
Features | Vite
Vite only performs transpilation on .ts files and does NOT perform type checking. ... CSS modules behavior can be configured via the css.modules...
Read more >
Using with Preprocessors - Tailwind CSS
A guide to using Tailwind with common CSS preprocessors like Sass, Less, ... by multiple tools, your CSS will compile much quicker using...
Read more >
Bundle Stylesheets and Add LiveReload With Rollup
Just below the function declaration, we can see that it's called with the styles output by PostCSS. Pretty snazzy, right?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found