- ABP Framework version: 6.0.3
- UI Type: Angular
- Database System: EF Core - SQL Server
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
I have my client based on angular, as usual, I decide to create a desktop version of it using electron, it is working. The only problem that I am facing, is on auth-server, when loading https://localhost:44322/Account/Login jquery is not loagin properly, when i load from electron app, Network
I am assuming it is because jquery is loaded after LeptonX.global js is loaded
so, my question is,
is it possible to override a bundles, global bundles to make jquery be present first. is it possible to override the main layout.cshtml like vies/pages/_Layout.cshtml to load jquery manually here
any idea is welcome
6 Answer(s)
-
0
is it possible to override a bundles, global bundles to make jquery be present first. is it possible to override the main layout.cshtml like vies/pages/_Layout.cshtml to load jquery manually here
Hi,
You can try:
public class MyBundleContributor : BundleContributor { public override void ConfigureBundle(BundleConfigurationContext context) { context.Files.Insert(0, "/lib/jquery/jquery.js"); } } Configure<AbpBundlingOptions>(options => { options.ScriptBundles.Configure( LeptonXThemeBundles.Scripts.Global, bundle => { bundle.AddContributors(new MyBundleContributor()); } ); });
-
0
-
0
is it a way to refresh redis?
I didn't get it.
I tested on my localhost and it works. Also something interesting is, any idea why jquery is not on production ?
The bundle system will bundles & minifies for the production environment: https://docs.abp.io/en/abp/latest/UI/AspNetCore/Bundling-Minification#bundling-mode
You can try configuring the
AbpBundlingOptions
or ignore Jquery file.Configure<AbpBundlingOptions>(options => { options.Mode = BundlingMode.None; }); Or.. Configure<AbpBundlingOptions>(options => { options.MinificationIgnoredFiles.Add("/lib/jquery/jquery.js"); });
-
0
-
1
Hi,
Seems the problem is not related to ABP but Electron.
See: https://github.com/electron/electron/issues/345 https://github.com/electron/electron/issues/15404#issuecomment-433546435
You may need to disable the
nodeIntegration
-
0
Thank you very much