I've recently taken on the task of merging 2 apps with a decent amount of overlapping functionality into one app. I'm using Vue as the front end library and consuming data from a .NET core back end. Webpack is providing all the other magic. I decided to use Areas to separate the disparate functionality, so I have 2 entry points in webpack.config.js.
module.exports = {
context: __dirname,
entry: {
app1: "./app1/bootApp.js",
app2: "./app2/bootApp.js"
}
When I run the application, I get the contents of index.cshtml but nothing else. Vue isn't being loaded.
I've defined routes for the areas like so: ` app.UseMvc(routes => { routes.MapRoute( name: "app1", template: "{app1:exists}/{controller=Home}/{action=Index}/{id?}" );
routes.MapAreaRoute(
name: "default",
areaName: "app1",
template: "{controller=Home}/{action=Index}/{id?}"
);
and another one just like that route for app2.
Because I can see the contents of index.cshtml for app1 I am really puzzled as to why Vue isn't loading.
Barebones demo here.