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

Provide option to post process styles #237

bnm12 opened this Issue Oct 10, 2018 · 2 comments


None yet
2 participants
Copy link

bnm12 commented Oct 10, 2018

Hi :)
We have a business case which requires us to do some post processing of the output of rollup-plugin-vue and since we lack a plugin system I've had to make this fork to achieve our goal:
unfortunately now we have to maintain a parallel implementation of this where we would much rather maintain a plugin which is not impacted by every code change here.
It also just feels plain wrong to have this very specific feature code inside rollup-plugin-vue - it feels more like a plugin kind of thing


This comment has been minimized.

Copy link

znck commented Oct 23, 2018

I would prefer to use rollup's plugin system rather than re-inventing the wheel.

Could you provide some use cases (or reasons) for your fork?


This comment has been minimized.

Copy link

bnm12 commented Oct 23, 2018

The specific use case here is that working with the new SharePoint framework (SPFX) if you want to use their theming capabilities you have to load all your css through a JS method called "loadStyles" (It goes in and does literal string replacement in your css it's quite silly, but there's not really anything we can do about it).
This means that what I need is something which lets me jump in after the .vue files have been parsed, so I can take the style section and convert to a line of script instead. But ideally before the finished parsing of the files so I don't have to try to "parse" the "compiled" code to split it again and combine as only script.

As far as I an tell the underlying mechanisms of this plugin only allows me to configure and supply a postCSS plugin, which will be very powerful, but still only works with the css, and I need one step above that to convert the css to script.

rollup-plugin-vue has the exact state I need: an object with template, script & css which all get combined to a final "compiled" output, so it only seemed natural to jump in there.

Hope this makes sense otherwise ask me to clarify more - this feels a bit rambly

@znck znck changed the title Feature request: plugins Provide option to post process styles Oct 24, 2018

@znck znck closed this in 2ae1bbf Jan 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment