When Using Custom Theming CSS and JS Files in 'wwwroot' w/Hyphenated Names Are Not Recognized and Produce 404s When Referenced
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
When using a custom theme, bundling, 'abp-script', 'abp-style', 'link' and 'script' methods of file inclusion do not recognize and deliver files that contain hyphens. This behavior is not limited to custom themes, and can be reproduced by downloading the source code for Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic and referencing it within an MVC Web app.
Reproduction Steps
Refer to CSS or JS files from within a custom theme by using bundling, 'abp-script', 'abp-style', 'link' and 'script' methods methods. Observe that those files are not being delivered and produce 404 errors.
Expected behavior
Assets files from within a custom theme that are included using bundling, 'abp-script', 'abp-style', 'link' and 'script' methods should be recognized and delivered by the theme mechanics.
Actual behavior
404 errors are produced.
Regression?
No response
Known Workarounds
- Rename the files by removing the hyphens.
or
- Copy the files to the MVC Web's wwwroot folder.
Version
8.0.0
User Interface
MVC
Database Provider
EF Core (Default)
Tiered or separate authentication server
Tiered
Operation System
Windows (Default)
Other information
Behavior seems to be specific to the Theme mechanics. Copying the files to the wwwroot folder of the MVC Web app is one of two workarounds discovered. Note that after doing so, no 404s are produced:
hi
and can be reproduced by downloading the source code for Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic and referencing it within an MVC Web app.
Can you upload such a project on GitHub?