Closed fskreuz closed 9 years ago
Perhaps the component definition could return a base
property, which is a constructor to extend from:
component.exports = {
base: require( 'rvc!parent.html' ),
...
};
What about a separate property on component with the moniker of the component to extend?
component.base = 'parent'
component.exports = {...}
@Rich-Harris Your comment just popped up. I like putting it outside the options, because it's a load thing, not an options thing.
Could be either object or string I suppose
It would be nice to have it similar to the non-loader syntax. Makes it more consistent.
Closing this issue. Figured out that inheritance is complicated compared to just building components with configurable options.
This is from the
make
functionhttps://github.com/ractivejs/rvc/blob/master/rvc.js#L386
https://github.com/ractivejs/rvc/blob/master/rvc.js#L375
Unless I'm overlooking something on the docs and readmes, this means
rvc
components can't extend fromrvc
components becauseRactive.extend
and notParent.extend
options
is hard-coded in the plugin, and not the one incomponent.exports
It would be nice to have something like