[Vuejs]-Vue app with .NET core backend api with Areas, using webpack, Vue is not loading

0👍

After a day of digging around, I found a solution to the problem. The index.cshtml file was loading just fine, and there was an element with an id of app per convention, but I decided at first to try and forgo the framework default _Layout.cshtml file and _ViewStart.cshtml file. The layout file in other MVC apps we’ve integrated Vue into have an element in the head section that looks like this: <base href="/" />.
In the router, we define the root route path as "/", so it seems that by skipping the layout file that included the base element, Vue didn’t have anything to attach the root route to and all subsequent relative links to. So the index page rendered just fine, but Vue never loaded.

Leave a comment