-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSS isolation doesn't seem to work with lazy loaded assembly #26542
Comments
FYI @captainsafia |
@sm15455 Can you share a repro project? I was not able to repro this issue on 5.0.0-rc.2.20465.7 (note: RC2). Also, I assume you are using the lazy-loading feature as documented here. FWIW, with the way that lazy-loading is setup, the isolated CSS is loaded when the application is launched. The CSS itself is applied when the component is instantiated. So the flow looks roughly like this.
|
@captainsafia I have investigate the issue and have found my problem description to be misleading. Basically, everything works but a little exception. here is what I did.
Now the browser opens and everything is ok, the component is loaded. I close the browser and.
Now the browser opens, and the component is loaded but the style is not applied because it's not included in the scoped.style.css file. |
It looks like we resolved this issue with build incrementalism and CSS updates in VS as part of #24337. Closing this for now. |
Hi,
I have a solution containing 2 projects: a Blazor RC1 project and library project.
The library contains a single component and is lazy loaded by the application. The component has a css file that follows css isolation naming rules. When I load the assembly, the assembly is correctly loaded and the component rendered, but the CSS file is ignored. The CSS for the component is not included in the scoped.style.css file (I think it's correct), but it's not even loaded at run time. Is it a bug or this scenario is simply not supported?
The text was updated successfully, but these errors were encountered: