Skip to content

[Blazor] JS isolation improvement - Colocate CS, CSS and JS files #26145

@daniel-p-tech

Description

@daniel-p-tech

Hi,

When the work on JS isolation was first announced, I was expecting something similar to CSS isolation where I would be able to create ComponentXYZ.razor.js file. Apparently other developers are in favor of this idea as well:

#23560

I'd like to take this approach further as suggested in a separate ticket:
https://github.com/dotnet/aspnetcore/issues/24943

I really believe there is a great benefit in organizing a large project this way, it's a lot more convenient to find JS/CSS files related to a component rather than chasing them down in a separate folder. This is exactly how we organize our large WebForms projects as well, so I'm speaking from experience.

Thank you for your consideration!

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedaffected-mostThis issue impacts most of the customersarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-jsinteropThis issue is related to JSInterop in Blazorseverity-minorThis label is used by an internal tool

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions