Closed ibyteyou closed 6 years ago
Hi, maybe we can try another way to resolve this problem.
I wrote a pre-loader for your issue. See here. Hope this helps.
@HaoyCn it's works! good job!
My pleasure. :P
@HaoyCn what do you think, vue-loader must have it? Or should I close the issue?
@patriciussanctus I don't think that vue-loader must contain this feature cuz we can already implement it using the proposed apis like loaders
and preLoaders
. After all, vue-loader is too heavy already.
What problem does this feature solve?
#418
let's imagine an abstract situation when:
We can't use
include ./tab-1.pug
, because process editing of file unbearable without hot reloading.We can't use components system, because between original parent and needed child may be n-count any ancestors. And we will need use big deep paths as
$parent.$parent.$parent
or excessprops
.A system in which 10 elements within themselves have similar variables and functions looks cumbersome.
simple example:
End user experience concludes in situations, when components needs in interchange of templates which has convention of using functionality.
I suggest the using "the template in template" with supporting props
src
... andlang
(if it's realistic).It's will be perfect for components, which have default theme, can change theme and ready for customization.
What does the proposed API look like?