-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Blazor WebApp 9.1.0 Bundle Issues #22330
Comments
hi Can you share your test project? |
This happens even with the default templates. To reproduce, use CLI version 0.9.24 to generate a Blazor WebApp project.
Initially, when in InteractiveServer-mode, the Welcome card on the homepage loads fine. |
Thanks. I will check it. |
Can you share a test template project that can reproduce the JS error? Thanks. |
I've got exactly the same problem after upgrade in Blazor WebApp. When the rendermode changes from Server to Webassembly then the icons and styles are missing. There is something wrong with bundling because abp bundle command doesn't help |
@maliming Thanks, Adding the css references resolves the isolated css issue. |
@jacekmichalski Good spot, yes icons still broken for me after interactive render despite the isolated css working. |
Thanks, I will check your project. |
hi
public class AbpSolution1BundleContributor : IBundleContributor
{
public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
context.BundleDefinitions.Insert(0, new BundleDefinition
{
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/bootstrap/css/bootstrap.min.css"
});
context.BundleDefinitions.Insert(1, new BundleDefinition
{
Source = "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/fontawesome/css/all.css"
});
}
} |
Is there an existing issue for this?
Description
After upgrading my ABP Blazor WebApp from 9.0.0 to 9.1.0, I'm encountering issues with the new bundling system.
It seems like isolated CSS in my components aren't being bundled properly - the page displays correctly initially but then refreshes and the stylings are lost. I'm also getting jquery errors during login I didn't previously.
To test further, I tried creating a new ABP WebApp project in 9.0.0 and using abp update to update it to 9.1.0
After doing so, I encounter javascript errors during login.
`ReferenceError: Swal is not defined
Stack trace:
I've read the migration guide (updated OpenIdidict) and the new Blazor bundling guide, but there doesn't seem to be anything new I need to do as part of the upgrade. Am I missing something?
Reproduction Steps
Create a Blazor WebApp in 9.0.0
Update it to 9.0.1 using abp update
Fix OpenIddict as per migration guide and add a new EF migration
Build
Try to login
Observe exceptions in js.
Expected behavior
Should function as per 9.0.0 without exceptions
Actual behavior
`ReferenceError: Swal is not defined
Stack trace:
Regression?
9.0.0 worked fine.
Known Workarounds
No response
Version
9.1.0
User Interface
Blazor
Database Provider
EF Core (Default)
Tiered or separate authentication server
None (Default)
Operation System
Windows (Default)
Other information
No response
The text was updated successfully, but these errors were encountered: