vite-plugin-vue2
vite-plugin-vue2 copied to clipboard
Inject CSS in JavaScript
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
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.