Thank you for your work on the vue-loader its really amazing to play with it. Feels like black magic ;)
Im playing around with to try to generate a static styleguide. I was wondering if there is an easy way to "prerender" HTML files using vue.js -> webpack -> gulp
I had partial success doing so here:
https://github.com/meodai/bonescss/tree/documentation
The only thing that get generated is the JS, would be nice if index.html could be the result of demo and the already applied main.js
Any idea how I could achieve this?
@meodai you could get the html in a similar way to how you test with karma: http://vuejs.github.io/vue-loader/workflow/testing.html
var componentA = require('a-component.vue');
var vm = new Vue({
template: '<div><test></test></div>',
components: {
'test': ComponentA
}
}).$mount()
console.log(vm.$el); // should output html
@meodai You can achieve this with prerender-spa-plugin for Webpack. I use it for Vue apps all the time with great success. 馃槂
Most helpful comment
@meodai You can achieve this with prerender-spa-plugin for Webpack. I use it for Vue apps all the time with great success. 馃槂