Browse Source

Update document

pull/7333/head
liangshiwei 6 years ago
parent
commit
31d5fead5c
  1. 22
      docs/en/UI/AspNetCore/Bundling-Minification.md
  2. 22
      docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md

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

@ -165,7 +165,27 @@ public class MyWebExtensionModule : AbpModule
} }
```` ````
> It's not possible to configure unnamed bundle tag helpers by code, because their name are not known at the development time. It's suggested to always use a name for a bundle tag helper. You can also use the `ConfigureAll` method to configure all existing bundles:
````C#
[DependsOn(typeof(MyWebModule))]
public class MyWebExtensionModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBundlingOptions>(options =>
{
options
.ScriptBundles
.ConfigureAll(bundle => {
bundle.AddFiles(
"/scripts/my-extension-script.js"
);
});
});
}
}
````
## Bundle Contributors ## Bundle Contributors

22
docs/zh-Hans/UI/AspNetCore/Bundling-Minification.md

@ -167,7 +167,27 @@ public class MyWebExtensionModule : AbpModule
} }
```` ````
> 无法通过代码配置未命名的bundle tag helpers, 因为它们的名称在开发时是未知的. 建议始终使用bundle tag helper的名称. 你也可以使用 `ConfigureAll` 方法配置所有现有的捆绑包:
````C#
[DependsOn(typeof(MyWebModule))]
public class MyWebExtensionModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBundlingOptions>(options =>
{
options
.ScriptBundles
.ConfigureAll(bundle => {
bundle.AddFiles(
"/scripts/my-extension-script.js"
);
});
});
}
}
````
### Bundle 贡献者 ### Bundle 贡献者

Loading…
Cancel
Save