From 6d16c8e3b6f8b438d5588582e0c3be1572fb96e8 Mon Sep 17 00:00:00 2001 From: maliming Date: Mon, 25 Oct 2021 14:42:30 +0800 Subject: [PATCH] Update Bundling-Minification.md Resolve #10413 --- .../en/UI/AspNetCore/Bundling-Minification.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/UI/AspNetCore/Bundling-Minification.md b/docs/en/UI/AspNetCore/Bundling-Minification.md index de706c8ff6..d262a9dd7f 100644 --- a/docs/en/UI/AspNetCore/Bundling-Minification.md +++ b/docs/en/UI/AspNetCore/Bundling-Minification.md @@ -390,6 +390,27 @@ Configure(options => Given file is still added to the bundle, but not minified in this case. +### Load JavaScript and CSS asynchronously + +You can configure `AbpBundlingOptions` to load all or a single js/css file asynchronously. + +**Example:** + +````csharp +Configure(options => +{ + options.PreloadStyles.Add("/__bundles/Basic.Global"); + options.DeferScriptsByDefault = true; +}); +```` + +**Output HTML:** +````html + + + +```` + ## Themes Themes uses the standard package contributors to add library resources to page layouts. Themes may also define some standard/global bundles, so any module can contribute to these standard/global bundles. See the [theming documentation](Theming.md) for more.