Razor Pages has a bundling feature for use with css isolation.
I have these pages:
/Pages/Products/Index.cshtml.css/Pages/Orders/Edit.cshtml.css/Pages/Orders/Create.cshtml.css
During compilation, a bundle will be generated: ~/AssemblyName.styles.css.
However, suppose I also have private pages only for staff members:
/Pages/Private/Accounts.cshtml.css/Pages/Private/Administration.cshtml.css/Pages/Private/Dashboard.cshtml.css
They would be included in the same bundle as above.
How can I generate two bundles: one for users, and another for staff?
UPDATE
I'm aware of tools for compiling / minifying / bundling, but prefer a built-in approach if possible.
Bundling is the process of taking multiple source files and combining them into a single output file. We can create one for users. like:
When using bundling, we have to update our and tags to point to the bundle route. It could look like this:
You can have a look at Bundle and minify static assets in ASP.NET Core and Bundling to know more.