-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Recently all static files were moved out of the cloudscribe.Web.Common library as of version 3.0.6, those files now live in cloudscribe.Web.StaticFiles which is referenced by cloudscribe.Web.Common so the package will come in automatically.
However there is a breaking change if you upgrade to cloudscribe.Core.Web 3.1, the common static files middleware is no longer automatically wired up by cloudscribe.Core. So to solve that in your own project after upgrading to cloudscribe.Core.Web 3.1 or newer you need to add this on the Configure method of startup after other static files middleware:
app.UseCloudscribeCommonStaticFiles();
the reasons for this change are discussed here: cloudscribe/cloudscribe#434
The advantage of separating the static files and not opting into using them automatically from cloudscribe core is that now it is possible to leave that line out and instead copy all the static files into your own project and serve them from disk. In low budget hosting this can be beneficial because it will not load the assembly for the static files into memory and therefore will consume slightly less memory.
If you do want to host those files locally in your project file system instead of using them as embedded resources, you can do so as follows:
- create a folder named cr under wwwroot (this is needed as it is part of the path for the embedded files)
- copy the js, css, fonts, and images folders from the source code here into the cr folder