Is it possible to extend/modify a build plugin with a sub package?


#1

Hey guys,

I’m attempting to build CSS compiler system that allows you to include just the plugins you need for your app, so a modular approach would be prefered.

Here’s the scenario: Package A, for example masterPackage, registers a build plugin which attaches to filename.ext. Package B masterPackage-extension, depends on package A but only modifies the build plugin in package A to include additional compiler options.

I can’t figure out if this is possible as the scope of the plugin handler seems restricted to the current package. Does anybody know if it is possible to extend a source handler once it is declared, similar to how you can for other package files?

Keen to hear your ideas, thanks!


#2

Could any core devs help out here? @slava @avital @glasser @sashko perhaps.


#3

I don’t think there is a good way to achieve this behavior right now. But you are in luck: Glasser and I are working on this problem this week.


#4

Also, as a separate note: please don’t tag people like this in your posts. This is annoying and they will unlikely to reply to you.


#5

Thanks Slava, I seem to always be bending the rules at the moment. Good to know it’s on your radar though, I’ll see if I can hack around it in the meantime.


#6

Apologies, I had no intention to annoy (Sashko also mentioned it to me). Pity I knew you guys hold the key to these type of questions. For the future (and others) what’s the preferred way to reach out to MDG on technical implementation ideas that have no documentation?


#7

I think tagging is fine, but if you have strong validation that the person
you are tagging has something to do with the question. And also, when 3
other people are tagged, it is much easier to ignore.