diff --git a/README.md b/README.md index dfd5c69..cc8424e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Iconduit browser config loader +# Iconduit browser configuration loader _A Webpack loader for `browserconfig.xml` files_ @@ -18,6 +18,25 @@ _A Webpack loader for `browserconfig.xml` files_ [badge-npm-version-link]: https://npmjs.com/package/@iconduit/browserconfig-loader +This loader processes [browser configuration] files, adding any images or polling +URI assets to the bundle and resolving their URLs in the output browser configuration +file. + +[browser configuration]: https://msdn.microsoft.com/library/dn320426(v%3Dvs.85) + +It supports: + +- Resolving [tile images] +- Resolving [badge polling URI assets] +- Resolving [notification polling URI assets] + +[tile images]: + https://msdn.microsoft.com/library/dn320426(v%3Dvs.85)#specifying-tile-images-and-assets +[badge polling uri assets]: + https://msdn.microsoft.com/library/dn320426(v%3Dvs.85)#defining-badge-polling +[notification polling uri assets]: + https://msdn.microsoft.com/library/dn320426(v%3Dvs.85)#defining-notification-polling + ## Usage ```js @@ -27,7 +46,7 @@ export default { module: { rules: [ { - test: /\.(png|jpg|gif)$/i, + test: /\.(png|jpg|gif|xml)$/i, type: "asset/resource", }, { diff --git a/src/index.ts b/src/index.ts index 244af82..4da983c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,8 +3,6 @@ import { resolve } from "path"; import { callbackify } from "util"; import type { LoaderDefinitionFunction } from "webpack"; -// Schema: https://msdn.microsoft.com//library/dn320426(v=vs.85) - const browserConfigLoader: LoaderDefinitionFunction = function (source) { const XMLOptions = { attributeNamePrefix: "@_",