Open Closed

Issue with LeptonX CSS and JS Bundles after Upgrade to ABP.io 9 #9795


User avatar
0
viswajwalith created

We have manually upgraded our solution from ABP.io 7 to ABP.io 9.

After the upgrade, the LeptonX CSS and JS bundles are loading, but not the latest ABP.io 9 bundles in development mode.

Could you please confirm if there are additional steps or configurations required to enable the latest LeptonX bundles in ABP.io 9?We have manually upgraded our solution from ABP.io 7 to ABP.io 9.

After the upgrade, the LeptonX CSS and JS bundles are loading, but not the latest ABP.io 9 bundles in development mode.

Could you please confirm if there are additional steps or configurations required to enable the latest LeptonX bundles in ABP.io 9?


2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • After upgrading to ABP 9, you must update your bundling configuration to use the new Global Assets system introduced in ABP 9. The previous approach to bundling (used in ABP 7) is not compatible with the new system, and manual steps are required to ensure the latest LeptonX CSS and JS bundles are loaded, especially in development mode.

    Required Steps:

    1. Update Bundling Configuration:
      • Remove any old bundle contributor classes and manual global.js/global.css files.
      • In your module, configure the new bundling system using AbpBundlingOptions and add your contributors for LeptonX:
    [DependsOn(
             typeof(AbpAspNetCoreMvcUiBundlingModule),
             typeof(AbpAspNetCoreMvcUiLeptonXThemeBundlingModule)
         )]
         public class YourWebModule : AbpModule
         {
             public override void ConfigureServices(ServiceConfigurationContext context)
             {
                 Configure<AbpBundlingOptions>(options =>
                 {
                     options.StyleBundles.Get(MvcLeptonXThemeBundles.Styles.Global)
                         .AddContributors(typeof(YourStyleBundleContributor));
                     options.ScriptBundles.Get(MvcLeptonXThemeBundles.Scripts.Global)
                         .AddContributors(typeof(YourScriptBundleContributor));
                 });
             }
         }
    
    1. Use MapAbpStaticAssets:

      • In your Startup.cs or module initialization, replace app.UseStaticFiles() with app.MapAbpStaticAssets() to ensure virtual files (including LeptonX assets) are served correctly in .NET 9.
    2. Remove Old Bundling Artifacts:

      • Delete any global.js or global.css files from your wwwroot if they were previously generated.
      • Remove the AbpCli:Bundle section from your appsettings.json.
    3. Ensure Correct NuGet Packages:

      • Reference the latest LeptonX theme bundling package:
    <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX.Bundling" Version="9.0.0" />
    
    • Also, ensure you have the correct version of Volo.Abp.AspNetCore.Mvc.UI.Bundling.
    1. Development Mode:

      • The new bundling system automatically serves the latest files in development mode. No manual bundle regeneration is needed.
    2. Check for Additional Module Bundling:

      • If you use other ABP commercial modules, add their corresponding bundling modules as dependencies.

    Summary:
    You must migrate your bundling configuration to the new Global Assets system, update your module dependencies, and use MapAbpStaticAssets for static file serving. This ensures the latest LeptonX bundles are loaded in ABP 9, including in development mode.

    Sources:


    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share a project to show the problem?

    liming.ma@volosoft.com Thanks.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 01, 2025, 08:37