I am using ASP.NET Core
, with Kestrel
for a project and it runs fine. But I have a situation where I want to make the jspm_packages
folder available to the application at runtime, but it's in a directory above my wwwroot
directory.
Searching around, the configuration for <IApplicationBuilder>.UseStaticFiles(n)
seemed like the best approach. With this setup;
app.UseStaticFiles(new StaticFileOptions {
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "jspm_packages")),
RequestPath = "/jspm_packages"
});
That is working fine, but I've noticed that I see a lot of stuff in the log each time I refresh a page, not just when loading up the application.
My questions are ...
- Does
UseStaticFiles
actually copy files at any point? Or is it just a matter of redirecting/allowing pathing? - If it does copy files, does this happen on every request, or just at application startup?
The reason I suspect it copies files is because if I start the application and run it, and then add something to the jspm
packages by using jspm install xyz
, I have to shut down the program and compile it again, and then run it again, for that package to become available.
That, and the sheer loading time of page refreshes is worrying me. I'm also trying to consider the possibility that this is some odd behavior of jspm
at work.