简体   繁体   中英

Laravel Vue Inertia need hard refresh for script asset in app.blade every change route

I have a script tag from CoreUI in my app.blade.php <script src="{{ asset('js/coreui.js') }}" defer></script> the problem is in every route page the script isn't being called thus not working the functions inside, I tried to require it in my app.js require('./coreui') but still doesn't work. To make it work I need to hard refresh the browser.

你提供了一些小信息,但试试这个:

<script src="{{ mix('/js/coreui.js') }}" defer></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM