-
Notifications
You must be signed in to change notification settings - Fork 48
Next steps #34
Description
Prior design thread: #28
Thanks to the great work by @znck we now have a good start to iterate on. I did a quick review of the current codebase and here's a list of things I think we should work on next:
Feature Sync with Latest vue-loader
-
functional template support (vuejs/vue-loader@c8a016a, vuejs/vue-loader@585b70c, vuejs/vue-loader@c7b5376)
-
optional cache busting when generating source maps for blocks (vuejs/vue-loader@1123b12)
-
update
gen-id
implementation: https://github.com/vuejs/vue-loader/blob/master/lib/loader.js#L89 -
template compiler
transformToRequire
support wildcard (vuejs/vue-loader@c589454)- bug fix for srcset (vuejs/vue-loader@ddcea20)
-
named exports support (vuejs/vue-loader@2e2aa2b)
-
esModule default export support in custom blocks (vuejs/vue-loader@7459a87)
-
Scoped CSS transform bug fixes
-
use
prettier
instead ofjs_beautify
when formatting generated render function intemplate-compiler
To avoid having to maintain both side in parallel, I'll temporarily limit new features in vue-loader
until we refactor it to use this package internally.
Questions still open to Discussion
-
Current implementation seems to be assuming a module bundler environment, but technically this package should not be limited to that. (discussion in Assemble in line function #33)
-
Should hot-reload be handled in here? Currently the hot-reload logic is quite specific to webpack, which should be the responsibility of
vue-loader
. -
How to distribute the runtime (
normalizeComponent
and style injection code)? I think this is tricky since it involves how the bundler can locate the packages, and in some cases the runtime may need to be directly inlined (related to Assemble in line function #33).
We might need to rethink how assemble
works altogether. Rough idea: the base assemble
function should assume much less and try to allow the user to decide how to handle styles, hot-reload and the normalization.
/cc @znck @eddyerburgh