[Vuejs]-Vue including Javascript files twice in Laravel Spark Blade template

0👍

I ended up adding a stack to the bottom of my app.blade.php, so it looks like this:

<!-- JavaScript -->
@stack('scripts-bottom')
<script src="{{ mix('js/app.js') }}"></script>

Then in my other blade file, I push them onto the stack:

@push('scripts-bottom')
<script type="application/javascript" src="{{ asset('js/sidebar.js') }}"></script>
<script type="application/javascript" src="{{ asset('js/addEditTask.js') }}"></script>
<script type="application/javascript" src="{{ asset('js/scheduler.js') }}"></script>
@endpush

Leave a comment