Browse Source

Update Bundling-Minification.md

Resolve #10413
pull/10418/head
maliming 5 years ago
parent
commit
6d16c8e3b6
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 21
      docs/en/UI/AspNetCore/Bundling-Minification.md

21
docs/en/UI/AspNetCore/Bundling-Minification.md

@ -390,6 +390,27 @@ Configure<AbpBundlingOptions>(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<AbpBundlingOptions>(options =>
{
options.PreloadStyles.Add("/__bundles/Basic.Global");
options.DeferScriptsByDefault = true;
});
````
**Output HTML:**
````html
<link rel="preload" href="/__bundles/Basic.Global.F4FA61F368098407A4C972D0A6914137.css?_v=637697363694828051" as="style" onload="this.rel='stylesheet'"/>
<script defer src="/libs/timeago/locales/jquery.timeago.en.js?_v=637674729040000000"></script>
````
## 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.

Loading…
Cancel
Save