4👍
✅
mix
.js('resources/js/admin.js', 'public/js').vue()
.js('resources/js/client.js', 'public/js').vue()
On your blade file, inject proper js file like:
@if (str_contains(Route::currentRouteName(), "admin"))
<script src="{{ asset('js/admin.js') }}" defer></script>
@else
<script src="{{ asset('js/clients.js') }}" defer></script>
0👍
mix.js('resources/front/js/app.js', 'public/js').vue()
.sass('resources/front/css/app.scss', 'public/css')
.options({
autoprefixer: {
options: {
browsers: [
'last 6 versions',
]
}
}
})
mix.browserSync('your_site')
mix.js('resources/admin/js/adminapp.js', 'public/js').vue()
.sass('resources/admin/css/adminapp.scss', 'public/css')
.options({
autoprefixer: {
options: {
browsers: [
'last 6 versions',
]
}
}
})
mix.browserSync('your_site/admin')
Source:stackexchange.com