inca / voie

[UNMAINTAINED] Simple Vue.js router / layout manager
141 stars 7 forks source link

Would like to try with webpack... #1

Closed findborg closed 8 years ago

findborg commented 8 years ago

I would like to try this using webpack. Could you build a simple example or starter frame for webpack?

inca commented 8 years ago

Sure, will do my best to add an example this week. I plan to add examples for both webpack and browserify as those two are extremely common.

findborg commented 8 years ago

Awesome, I am learning to use vue and love it so far. Right now I am playing around with vue-router but if I understand, if I can get your system working I will not need it. Correct?

findborg commented 8 years ago

Does your system get rid of that #! mess?

inca commented 8 years ago

Yep, voie and vue-router are both routers, so you have to choose either one. There are specific differences in terms of overall structure and transition pipelines, I'll elaborate on them in docs.

Re: #!, sort of. Voie use history, by default it uses HTML5 history (meaning no #! hashbangs in URLs, but requires specific server setup — serving the same HTML wrapper for all app URLs). The same thing could be done in vue-router by specifying hashbang: false, history: true when instantiating a router — but still, be aware that HTML5 history support must be backed by corresponding server setup.

findborg commented 8 years ago

I played with your demo, even got the example app working on my machine.. Gotta say, I think I like it a lot. Am I wrong to think that Voie will play nice with some server-side rendering? Anyway, I can't wait for the webpack example... note* keep it simple... everyone always makes super detailed examples instead of building up slowly. Can be hard for people like me who are learning something new. BTW, very nice work so far.

inca commented 8 years ago

@findborg Thank you for your kind words!

Re: server-side rendering, that's a larger topic and deserves a separate thread. In short, no, I don't think it's possible with Vue in general. You should read this, this and that. Now, there's vue-server — but to be frank the whole idea seems a bit awkward.

Seriously, considering latest trends I don't think one should even try to prerender SPAs altogether.

findborg commented 8 years ago

Actually, I use Joomla CMS a lot and I already have vue rendering joomla templates that are based on php. Something that I like to mess with. But, like you said that is another topic. Shoot me a note when you have the "very basic" webpack demo done and I will give it a go immediately.

findborg commented 8 years ago

Have you worked on the webpack example yet? Been on holiday myself, but back and anxious to try this out.

inca commented 8 years ago

Hey, I decided not to repeat full example for both bundlers and provide minimalistic starter kit instead. Please check it out: https://github.com/inca/voie-starter-webpack