vuejs / vue-component-compiler

Compile a single file Vue component into a CommonJS module.
MIT License
342 stars 52 forks source link

Next steps #34

Closed yyx990803 closed 6 years ago

yyx990803 commented 6 years ago

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

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

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

Akryum commented 6 years ago

For meteor, I would just need the component definition JS and the style (not sure how to manage pre-processors though - currently, it's a set of individual atmosphere packages that exposes a global to the .vue processor). I already made a HMR system that works in Meteor and since it's quite specific, I agree it should be left to the implementation outside of the component compiler.

rigor789 commented 6 years ago

For nativescript-vue we would need multiple template and script blocks (style already supports multiple blocks). I have opened a PR in the Vue repository to add support for this: https://github.com/vuejs/vue/pull/7264

Another thing that we should consider is allowing changing the template-compiler for a given block, for example if we have a <template web /> block, we would like to use the official vue-template-compiler package, but for <template native /> we would like to use our own fork which includes some custom compiler modules specific to nativescript-vue.

znck commented 6 years ago

I have moved all open tasks to the board.

I would be actively working on these tasks from this Friday. If anyone is picking something, please convert the task to issue and assign it to yourself. If you don't access then ping me, I'll do it for you.

znck commented 6 years ago

The only open issue from this list is #36, tracked separately.