I Have a blank asp.net core 5 web application and I have used npm to install vue3 and scaffold one of the default setups. It creates a directory for the app in the projects root directory and in the new app folder I set the vue.config.js file build route to the projects wwwroot folder using the following:
const path = require("path");
module.exports = {
outputDir: path.resolve(__dirname, "../wwwroot"),
assetdir: "../wwwroot"
}
This works and my npm run build does in fact save to a wwwroot folder however it deletes the current wwwroot folder in visual studio and creates a new wwwroot folder. The problem is the globe next to the wwwroot disappears when it is recreated and it is just a folder icon. Not sure how important that is but strange that happens
I next go into the startup.cs and add
app.UseDefaultFiles(); // Enables default file mapping on the web root.
app.UseStaticFiles();
Now when I go to run this project it loads a blank page but if I go to the url https://localhost:44391/wwwroot/ it loads just a menu with Home and About at the top and if I click home it takes me to https://localhost:44391/ with the correct vue home template. I do have the standard router setup but I have not changed any of that and history mode was set as yes during the vue installation if that matters. I am not sure why this is not working correctly. Do I need to add UseContentRoot() in program.cs or something?
wwwrootto put building files , and add spa configs in startup.cs stackoverflow.com/a/55989907/10158551