vite-plugin-vue2 icon indicating copy to clipboard operation
vite-plugin-vue2 copied to clipboard

Inject CSS in JavaScript

Open Djaler opened this issue 2 years ago • 1 comments

It would be cool to have an option like css in old good rollup-plugin-vue: https://github.com/vuejs/rollup-plugin-vue/blob/v5.1.9/src/index.ts#L119

Djaler avatar Mar 05 '22 14:03 Djaler

Would a pull request for this be accepted? Alternatively, could we consider exposing some additional metadata on the .vue that includes what scripts/stylesheets/templates were extracted from the SFC? If we had access to that, writing a plugin to inline the CSS in the JS is relatively trivial.

It's doable right now, but you have to copy/paste those implementation details that I mentioned above which are not exposed from this plugin at the moment.

dcherman avatar Jun 08 '22 20:06 dcherman