vuejs / laravel-elixir-vue-2

Laravel Elixir Vue 2.0 support plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hot Module Reload

strebl opened this issue · comments

I have no idea where to start.
Thats why I ask here.
Is it possible to use the hmr feature of the Vue single component files with Laravel elixir?
If yes, can someone push me in the right direction?

Has anyone worked out how to do this? Preferably using webpack.

HMR is a bit complicated because it involves a Node.js development server that compiles with Webpack on the fly, and a client-side library that talks to the server and listen for updates. The most tricky part is integrating all this properly with the Laravel server and the Elixir workflow.

Unfortunately, I don't really have time to properly look into this as of now, and that's unlikely going to happen for this particular plugin. Maybe Jeffrey Way can tackle this in his recent rewrite of Elixir.

Thanks Evan for your explanation! Hoping @JeffreyWay will tackle this!

Yes, I got HMR working last night in fact. It's not too rough.

@strebl Basically, you'll have two servers running: the Webpack dev server, and your standard Laravel one. Then, your HTML should reference the dev server script, and that should do it. I'll post more details soon, but it's done.

Bump @JeffreyWay Ive been Looking Into This Ever since...
The Only Solution i got is this https://github.com/dolbex/webpack-laravel
Im excited that you will soon Try to Tackle this >;D

He has done it! It works, and its so covenient! Love it!
Check out Laravel Mix, the successor of Laravel Elixir.
webpack run hmr and it works🎉
In Laravel 5.4, Mix is the default.
Thanks Jeffrey!