-
Notifications
You must be signed in to change notification settings - Fork 810
vue-router lazy-load error #484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What error does it show? |
@JeffreyWay It is a error of
now it work |
@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. |
@codeitlikemiley it also very helpful when building history-mode Vue SPA |
im using history mode not hashbang for vue router SPA |
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? |
Figured it out!! Finally it was adding this to my webpack.mix.js that solved the problem and allowed me to remove that line from
|
@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. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
vue-router lazy-load error
my app.js
when I visit http://local.dev/admin/article ,auto redirect to http://local.dev/admin/,and the error show on console,is it a bug?
The text was updated successfully, but these errors were encountered: