Open jedrzejchalubek opened 7 years ago
Nice. Browsersync seem to work a little different than in Elixir. Keep an eye on this.
Roughly done on assely/assely/tree/laravel-mix and assely/framework/tree/laravel-mix branches.
Can be tested.
Great, will do tomorrow evening
ok, I get it to work really quick. Hot Reloading doesn't work at the time (it's a general problem - (https://github.com/JeffreyWay/laravel-mix/issues/233)). I think Jeffrey will add BrowserSync support soon. In the meantime, I get it to work with this article (https://ashokgelal.com/2017/01/29/laravel-mix-browsersync/).
How should the mix() helper function work? Like in Laravel <link rel="stylesheet" href="{{ mix('/css/app.css') }}">
or inside the Asset class.
Oh, good to know. I'll wait with merging.
It should be used inside Http/assets.php
when defining assets. Helper functions are namespaced in Assely for safety reasons, so there need to be imported. Something like this:
use function Assely\Helpers\mix;
Asset::add('app', ['path' => mix('css/app.css')]);
I haven't tested it out yet.
Yes, that's a good decision. Laravel Mix in general is not ready at the time. It works, but is not ready for production in my opinion.
I tested the enqueuing of media files. After my adjustment (https://github.com/assely/framework/pull/53) everything works fine.
The helper function (mix()
) could be merged into the master branch, because Laravel Elixir would also profit from it.
Move to Laravel Mix instead of Elixir.
mix()
helper function which will allow for versioning/cache busting assets