Razor class libraries and static web assets
Describe the Bug
When using nugetizer to pack Razor class libraries, static web assets that are generated during the build process (like scoped CSS or JavaScript files collocated with a component) are not included in the package. Files under "./wwwroot" are placed under ".contentFiles" in the package, which is the wrong location.
Steps to Reproduce
Create a Razor class library project and add the dependency to nugetizer. In the subfolder "./Components", add a Razor Component "Test.razor" and a scoped CSS file "Test.razor.css." with arbitrary content.
Create a file test.js in the "./wwwroot" folder.
Run dotnet pack on the project.
Expected Behavior
There should be a folder "./staticwebassets" within the package and another .props file in the build folder which copies the static assets during builds of projects that depend on the generated package.
The "./staticwebassets" folder should contain all generated static web assets and all static web assets which have been placed under the "./wwwroot" folder in the project.
Observed Behavior
The "./staticwebassets" folder is not created within the package. Scoped CSS and collocated JavaScript are not included in the package. Files under "./wwwroot" are included as contentFiles.
Removing the dependency to nugetizer and running dotnet pack gives the expected behavior.
Is there a workaround for this without having to remove the dependency to nugetizer?
I did an initial investigation. This requires adding specific support for static web assets SDK in nugetizer.
Please consider sponsoring this development. Otherwise it's low priority for me personally.
Thanks in advance!
Due to lack of recent activity, this issue has been labeled as 'stale'. It will be closed if no further activity occurs within 30 more days. Any new comment will remove the label.
This issue will now be closed since it has been labeled 'stale' without activity for 30 days.
