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.

Add extract css false option in lib build mode

See original GitHub issue

Clear and concise description of the problem

When buliding a lib, css will be extracted in a single file style.css, is there a way to bundle css in output js.

Suggested solution

Like rollup-plugin-postcss can set extract

Alternative

No response

Additional context

No response

Validations

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:30
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
m-nathanicommented, Nov 2, 2021

i cant really find a sustainable way to make the styles inline in lib mode… my lib is used in more then 5 place… and expected to grow… and i don’t want to manually import style file everywhere… so wanted to include as build itself…

is vite going proposed any solution ? 🤔

2reactions
ruofeecommented, Mar 21, 2022

Excuse me, is there a solution to this problem?

I wrote a vite plugin:

https://github.com/ruofee/vue-dynamic-form-component/blob/vite/build/ViteSingleCssPlugin.js

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracting CSS into JS with Angular 11 (deprecated extractCss)
Before Angular 11, we used to do this with extractCss: false in then angular.json config. Now this option has been marked deprecated, and...
Read more >
MiniCssExtractPlugin - webpack
If true, emits a file (writes a file to the filesystem). If false, the plugin will extract the CSS but will not emit...
Read more >
Build Options - Vite
If disabled, all CSS in the entire project will be extracted into a single CSS file. Note. If you specify build.lib , build.cssCodeSplit...
Read more >
The build Property - Nuxt
extractCSS. Enables Common CSS Extraction using Vue Server Renderer guidelines . Type: Boolean or Object; Default: false.
Read more >
CodeMirror 5 User Manual
Options are not checked in any way, so setting bogus option values is bound ... an extra CSS class will be added to...
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