Update Vite output path and remove redundant wwwroot configuration
This commit is contained in:
@@ -1,11 +1,5 @@
|
|||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
// Serve frontend from wwwroot at solution root
|
|
||||||
var webRootPath = Path.GetFullPath(Path.Combine(builder.Environment.ContentRootPath, "..", "wwwroot"));
|
|
||||||
Directory.CreateDirectory(webRootPath);
|
|
||||||
builder.Environment.WebRootPath = webRootPath;
|
|
||||||
builder.WebHost.UseWebRoot(webRootPath);
|
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|
||||||
builder.Services.AddControllers();
|
builder.Services.AddControllers();
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
outDir: '../wwwroot',
|
outDir: '../API/wwwroot',
|
||||||
emptyOutDir: true,
|
emptyOutDir: true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user