Currently, components must provide their templates as javascript strings. Embedding a multiline string in Javascript is something I personally have a strong dislike for, so I would much rather have my template in it's own file. However, this would require Vue to request the template from the server, put that in some cache somewhere, and then compile the component. (This is very similar to how Angular does things.)
I'm curious how other people are dealing with this currently? To me it seems like a huge roadblock for using Vue for something large... am I missing something?
For my needs the cost of doing 5 or 6 templates loads is almost never a consideration, and Webpack adds a significant level of complexity that I don't feel I need it. Browserify, on the other hand, I've used for some projects and would play rather nicely with Babel, so that's the direction I'm leaning.
All that aside, the Async Component support is actually really interesting! For my little test case (an Electron app), I just wrote a small component loader that loads the HTML off disk. The same approach could be used for anyone wishing to load html templates. I threw it into a gist, in case anyone was interested in it:
Most helpful comment
For my needs the cost of doing 5 or 6 templates loads is almost never a consideration, and Webpack adds a significant level of complexity that I don't feel I need it. Browserify, on the other hand, I've used for some projects and would play rather nicely with Babel, so that's the direction I'm leaning.
All that aside, the Async Component support is actually really interesting! For my little test case (an Electron app), I just wrote a small component loader that loads the HTML off disk. The same approach could be used for anyone wishing to load html templates. I threw it into a gist, in case anyone was interested in it:
https://gist.github.com/Morgul/297dcab9bf486cae4bbc