Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
vue-router lazy-load error #484
vue-router lazy-load error
@lichnow Awesome! Thank you for saving my life!!! It took me about half a day to figure out why chunks couldn't be loaded. My original code clips are here:
but chunk files are generated to
so i configed these content refer to your solution:
And everything is work, and the thunk files can be versioned, too! That 's so amazing~
I also Faced this Issued Follow Your Guide, but i still faced this...
The Fix Simple Fix Here is Adding this at your Header Tag
Hope this will be added to the documentation especially since if your building SPA and wanted to use Lazyloading on your vue router.
but then I realized setting this is screwing up with other vue components. For example I'm using https://github.com/spatie/vue-tabs-component and when I set the base href like above then the tabs stop working because instead of appending the hashtag to the current url it appends it to /
Any idea how what is the proper fix in this case?
referenced this issue
Oct 18, 2017
@vesper8 , thanks, this worked for me too. But can you still use hot module reload with this config setting?
I get the following error in my console.
The only workaround I found is to comment the setting before runing hmr, and uncomment before I compile.