PageSourceSearch

https://webpack.kr/7250.97e483bf4ccb19b9.js

js webpack.kr collected 2026-09-25 23:38:21 UTC 194,933 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7250],{7250:function(n,e,s){s.r(e),s.d(e,{default:function(){return l}});var a=s(2540),t=s(9710);function c(n){const e={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",pre:"pre",span:"span",strong:"strong",ul:"ul",...(0,t.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{align:"center"}),"\n",(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.a,{href:"https://npmjs.com/package/html-loader",children:(0,a.jsx)(e.img,{src:"https://img.shields.io/npm/v/html-loader.svg",alt:"npm"})}),"\n",(0,a.jsx)(e.a,{href:"https://nodejs.org",children:(0,a.jsx)(e.img,{src:"https://img.shields.io/node/v/html-loader.svg",alt:"node"})}),"\n",(0,a.jsx)(e.a,{href:"https://github.com/webpack/html-loader/actions",children:(0,a.jsx)(e.img,{src:"https://github.com/webpack/html-loader/workflows/html-loader/badge.svg",alt:"tests"})}),"\n",(0,a.jsx)(e.a,{href:"https://codecov.io/gh/webpack/html-loader",children:(0,a.jsx)(e.img,{src:"https://codecov.io/gh/webpack/html-loader/branch/main/graph/badge.svg",alt:"coverage"})}),"\n",(0,a.jsx)(e.a,{href:"https://github.com/webpack/webpack/discussions",children:(0,a.jsx)(e.img,{src:"https://img.shields.io/github/discussions/webpack/webpack",alt:"discussion"})}),"\n",(0,a.jsx)(e.a,{href:"https://packagephobia.now.sh/result?p=html-loader",children:(0,a.jsx)(e.img,{src:"https://packagephobia.now.sh/badge?p=html-loader",alt:"size"})})]}),"\n",(0,a.jsx)(e.p,{children:"Exports HTML as string. HTML is minimized when the compiler demands."}),"\n",(0,a.jsxs)(e.h2,{children:[(0,a.jsx)(e.span,{id:"getting-started"}),"Getting Started",(0,a.jsx)(e.a,{href:"#getting-started","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["To begin, you'll need to install ",(0,a.jsx)(e.code,{children:"html-loader"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-console",children:"npm install --save-dev html-loader\n"})}),"\n",(0,a.jsx)(e.p,{children:"or"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-console",children:"yarn add -D html-loader\n"})}),"\n",(0,a.jsx)(e.p,{children:"or"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-console",children:"pnpm add -D html-loader\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Then add the loader to your ",(0,a.jsx)(e.code,{children:"webpack"})," configuration. For example:"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"import"})," html ",(0,a.jsx)(e.span,{className:"token keyword",children:"from"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"./file.html"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h2,{children:[(0,a.jsx)(e.span,{id:"options"}),"Options",(0,a.jsx)(e.a,{href:"#options","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsx)(e.li,{children:(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.a,{href:"#sources",children:(0,a.jsx)(e.code,{children:"sources"})})})}),"\n",(0,a.jsx)(e.li,{children:(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.a,{href:"#preprocessor",children:(0,a.jsx)(e.code,{children:"preprocessor"})})})}),"\n",(0,a.jsx)(e.li,{children:(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.a,{href:"#postprocessor",children:(0,a.jsx)(e.code,{children:"postprocessor"})})})}),"\n",(0,a.jsx)(e.li,{children:(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.a,{href:"#minimize",children:(0,a.jsx)(e.code,{children:"minimize"})})})}),"\n",(0,a.jsx)(e.li,{children:(0,a.jsx)(e.strong,{children:(0,a.jsx)(e.a,{href:"#esmodule",children:(0,a.jsx)(e.code,{children:"esModule"})})})}),"\n"]}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"sources"}),(0,a.jsx)(e.code,{children:"sources"}),(0,a.jsx)(e.a,{href:"#sources","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"sources"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="}),"\n  ",(0,a.jsx)(e.span,{className:"token operator",children:"|"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),"\n  ",(0,a.jsx)(e.span,{className:"token operator",children:"|"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n      list",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        tag",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n        attribute",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n        type",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n        filter",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n          tag",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          attribute",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          attributes",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          resourcePath",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      urlFilter",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n        attribute",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        value",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        resourcePath",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      scriptingEnabled",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"true"})]}),"\n",(0,a.jsxs)(e.p,{children:["By default every loadable attribute (for example - ",(0,a.jsx)(e.code,{children:'<img src="image.png"/>'}),") is imported (",(0,a.jsx)(e.code,{children:"const img = require('./image.png')"})," or ",(0,a.jsx)(e.code,{children:'new URL("./image.png", import.meta.url)'}),").\nYou may need to specify loaders for images in your configuration (recommended ",(0,a.jsx)(e.a,{href:"/guides/asset-modules/",children:(0,a.jsx)(e.code,{children:"asset modules"})}),")."]}),"\n",(0,a.jsx)(e.p,{children:"Supported tags and attributes:"}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"audio"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"embed"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"img"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"srcset"})," attribute of the ",(0,a.jsx)(e.code,{children:"img"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"input"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"data"})," attribute of the ",(0,a.jsx)(e.code,{children:"object"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"script"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"href"})," attribute of the ",(0,a.jsx)(e.code,{children:"script"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"xlink:href"})," attribute of the ",(0,a.jsx)(e.code,{children:"script"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"source"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"srcset"})," attribute of the ",(0,a.jsx)(e.code,{children:"source"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"track"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"poster"})," attribute of the ",(0,a.jsx)(e.code,{children:"video"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"src"})," attribute of the ",(0,a.jsx)(e.code,{children:"video"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"xlink:href"})," attribute of the ",(0,a.jsx)(e.code,{children:"image"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"href"})," attribute of the ",(0,a.jsx)(e.code,{children:"image"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"xlink:href"})," attribute of the ",(0,a.jsx)(e.code,{children:"use"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"href"})," attribute of the ",(0,a.jsx)(e.code,{children:"use"})," tag"]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"href"})," attribute of the ",(0,a.jsx)(e.code,{children:"link"})," tag when the ",(0,a.jsx)(e.code,{children:"rel"})," attribute contains ",(0,a.jsx)(e.code,{children:"stylesheet"}),", ",(0,a.jsx)(e.code,{children:"icon"}),", ",(0,a.jsx)(e.code,{children:"shortcut icon"}),", ",(0,a.jsx)(e.code,{children:"mask-icon"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-icon"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-icon-precomposed"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-startup-image"}),", ",(0,a.jsx)(e.code,{children:"manifest"}),", ",(0,a.jsx)(e.code,{children:"prefetch"}),", ",(0,a.jsx)(e.code,{children:"preload"})," or when the ",(0,a.jsx)(e.code,{children:"itemprop"})," attribute is ",(0,a.jsx)(e.code,{children:"image"}),", ",(0,a.jsx)(e.code,{children:"logo"}),", ",(0,a.jsx)(e.code,{children:"screenshot"}),", ",(0,a.jsx)(e.code,{children:"thumbnailurl"}),", ",(0,a.jsx)(e.code,{children:"contenturl"}),", ",(0,a.jsx)(e.code,{children:"downloadurl"}),", ",(0,a.jsx)(e.code,{children:"duringmedia"}),", ",(0,a.jsx)(e.code,{children:"embedurl"}),", ",(0,a.jsx)(e.code,{children:"installurl"}),", ",(0,a.jsx)(e.code,{children:"layoutimage"})]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"imagesrcset"})," attribute of the ",(0,a.jsx)(e.code,{children:"link"})," tag when the ",(0,a.jsx)(e.code,{children:"rel"})," attribute contains ",(0,a.jsx)(e.code,{children:"stylesheet"}),", ",(0,a.jsx)(e.code,{children:"icon"}),", ",(0,a.jsx)(e.code,{children:"shortcut icon"}),", ",(0,a.jsx)(e.code,{children:"mask-icon"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-icon"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-icon-precomposed"}),", ",(0,a.jsx)(e.code,{children:"apple-touch-startup-image"}),", ",(0,a.jsx)(e.code,{children:"manifest"}),", ",(0,a.jsx)(e.code,{children:"prefetch"}),", ",(0,a.jsx)(e.code,{childr
1en:"preload"})]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"content"})," attribute of the ",(0,a.jsx)(e.code,{children:"meta"})," tag when the ",(0,a.jsx)(e.code,{children:"name"})," attribute is ",(0,a.jsx)(e.code,{children:"msapplication-tileimage"}),", ",(0,a.jsx)(e.code,{children:"msapplication-square70x70logo"}),", ",(0,a.jsx)(e.code,{children:"msapplication-square150x150logo"}),", ",(0,a.jsx)(e.code,{children:"msapplication-wide310x150logo"}),", ",(0,a.jsx)(e.code,{children:"msapplication-square310x310logo"}),", ",(0,a.jsx)(e.code,{children:"msapplication-config"}),", ",(0,a.jsx)(e.code,{children:"twitter:image"})," or when the ",(0,a.jsx)(e.code,{children:"property"})," attribute is ",(0,a.jsx)(e.code,{children:"og:image"}),", ",(0,a.jsx)(e.code,{children:"og:image:url"}),", ",(0,a.jsx)(e.code,{children:"og:image:secure_url"}),", ",(0,a.jsx)(e.code,{children:"og:audio"}),", ",(0,a.jsx)(e.code,{children:"og:audio:secure_url"}),", ",(0,a.jsx)(e.code,{children:"og:video"}),", ",(0,a.jsx)(e.code,{children:"og:video:secure_url"}),", ",(0,a.jsx)(e.code,{children:"vk:image"})," or when the ",(0,a.jsx)(e.code,{children:"itemprop"})," attribute is ",(0,a.jsx)(e.code,{children:"image"}),", ",(0,a.jsx)(e.code,{children:"logo"}),", ",(0,a.jsx)(e.code,{children:"screenshot"}),", ",(0,a.jsx)(e.code,{children:"thumbnailurl"}),", ",(0,a.jsx)(e.code,{children:"contenturl"}),", ",(0,a.jsx)(e.code,{children:"downloadurl"}),", ",(0,a.jsx)(e.code,{children:"duringmedia"}),", ",(0,a.jsx)(e.code,{children:"embedurl"}),", ",(0,a.jsx)(e.code,{children:"installurl"}),", ",(0,a.jsx)(e.code,{children:"layoutimage"})]}),"\n",(0,a.jsxs)(e.li,{children:["The ",(0,a.jsx)(e.code,{children:"icon-uri"})," value component in ",(0,a.jsx)(e.code,{children:"content"})," attribute of the ",(0,a.jsx)(e.code,{children:"meta"})," tag when the ",(0,a.jsx)(e.code,{children:"name"})," attribute is ",(0,a.jsx)(e.code,{children:"msapplication-task"})]}),"\n"]}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"boolean"}),(0,a.jsx)(e.code,{children:"boolean"}),(0,a.jsx)(e.a,{href:"#boolean","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.ul,{children:["\n",(0,a.jsx)(e.li,{children:"true: Enables processing of all default tags and attributes"}),"\n",(0,a.jsx)(e.li,{children:"false: Disables processing entirely"}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token comment",children:"// Disables attributes processing"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"object"}),(0,a.jsx)(e.code,{children:"object"}),(0,a.jsx)(e.a,{href:"#object","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["Allows you to specify which tags and attributes to process, filter them, filter URLs and process sources starting with ",(0,a.jsx)(e.code,{children:"/"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"list"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// All default supported tags and attributes"}),"\n              ",(0,a.jsx)(e.span,{className:"token string",children:'"..."'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"data-src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"data-srcset"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"srcset"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"urlFilter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["attribute",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," value",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," resourcePath"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attribute` argument contains a name of the HTML attribute."}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `value` argument contains a value of the HTML attribute."}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `resourcePath` argument contains a path to the loaded HTML file."}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"example\\.pdf$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"test"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"value",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"list"}),(0,a.jsx)(e.code,{children:"list"}),(0,a.jsx)(e.a,{href:"#list","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"list"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  tag",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n  attribute",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n  type",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n  filter",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n    tag",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    attribute",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    attributes",(0,a.jsx)(e.span,{className:"to
1ken operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    resourcePath",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.a,{href:"#sources",children:"supported tags and attributes"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"Allows to setup which tags and attributes to process and how, as well as the ability to filter some of them."}),"\n",(0,a.jsxs)(e.p,{children:["Using ",(0,a.jsx)(e.code,{children:"..."})," syntax allows you to extend ",(0,a.jsx)(e.a,{href:"#sources",children:"default supported tags and attributes"}),"."]}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"list"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// All default supported tags and attributes"}),"\n              ",(0,a.jsx)(e.span,{className:"token string",children:'"..."'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"data-src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"data-srcset"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"srcset"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Tag name"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"link"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Attribute name"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"href"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Type of processing, can be `src` or `scrset`"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Allow to filter some attributes"}),"\n                ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"filter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["tag",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attribute",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," resourcePath"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `tag` argument contains a name of the HTML tag."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attribute` argument contains a name of the HTML attribute."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attributes` argument contains all attributes of the tag."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `resourcePath` argument contains a path to the loaded HTML file."}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"my-html\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"test"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"resourcePath",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                    ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token operator",children:"!"}),(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"stylesheet"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"test"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"rel",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                    ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n                    attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"type ",(0,a.jsx)(e.span,{className:"token operator",children:"&&"}),"\n                    attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"type",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"trim"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"toLowerCase"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"!=="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"text/css"'}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                    ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:"If the tag name is not specified it will process all the tags."}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"You can use your custom filter to specify HTML elements to be processed."}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"t
1oken string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"list"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Attribute name"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Type of processing, can be `src` or `scrset`"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token comment",children:"// Allow to filter some attributes (optional)"}),"\n                ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"filter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["tag",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attribute",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," resourcePath"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `tag` argument contains a name of the HTML tag."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attribute` argument contains a name of the HTML attribute."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attributes` argument contains all attributes of the tag."}),"\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `resourcePath` argument contains a path to the loaded HTML file."}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token comment",children:"// choose all HTML tags except img tag"}),"\n                  tag",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"toLowerCase"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"!=="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:"Filter can also be used to extend the supported elements and attributes."}),"\n",(0,a.jsx)(e.p,{children:"For example, filter can help process meta tags that reference assets:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"list"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"meta"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"content"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"filter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["tag",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attribute",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," resourcePath"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n                    attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"value ",(0,a.jsx)(e.span,{className:"token operator",children:"==="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"og:image"'})," ",(0,a.jsx)(e.span,{className:"token operator",children:"||"}),"\n                    attributes",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"name ",(0,a.jsx)(e.span,{className:"token operator",children:"==="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"twitter:image"'}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                    ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n                  ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n                ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"[!NOTE]"}),"\n",(0,a.jsxs)(e.p,{children:["source with a ",(0,a.jsx)(e.code,{children:"tag"})," option takes precedence over source without."]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:"Filter can be used to disable default sources."}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"list"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n              ",(0,a.jsx)(e.span,{className:"token string",children:'"..."'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"tag"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"img"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"attribute"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"src"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"filter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{classN
1ame:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"urlfilter"}),(0,a.jsx)(e.code,{children:"urlFilter"}),(0,a.jsx)(e.a,{href:"#urlfilter","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"urlFilter"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"\n  attribute",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  value",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  resourcePath",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"undefined"})]}),"\n",(0,a.jsxs)(e.p,{children:["Allow to filter URLs. All filtered URLs will not be resolved (left in the code as they were written).\nNon-requestable sources (for example ",(0,a.jsx)(e.code,{children:'<img src="javascript:void(0)"/>'}),") are not handled by default."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"urlFilter"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["attribute",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," value",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," resourcePath"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `attribute` argument contains a name of the HTML attribute."}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `value` argument contains a value of the HTML attribute."}),"\n              ",(0,a.jsx)(e.span,{className:"token comment",children:"// The `resourcePath` argument contains a path to the loaded HTML file."}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"if"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"example\\.pdf$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"test"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"value",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"scriptingenabled"}),(0,a.jsx)(e.code,{children:"scriptingEnabled"}),(0,a.jsx)(e.a,{href:"#scriptingenabled","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"scriptingEnabled"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"true"})]}),"\n",(0,a.jsxs)(e.p,{children:["By default, the parser in ",(0,a.jsx)(e.code,{children:"html-loader"})," interprets content inside ",(0,a.jsx)(e.code,{children:"<noscript>"})," tags as plain ",(0,a.jsx)(e.code,{children:"#text"}),", so processing of content inside these tags will is ignored during processing."]}),"\n",(0,a.jsxs)(e.p,{children:["In order to enable processing inside ",(0,a.jsx)(e.code,{children:"<noscript>"})," for content recognition by the parser as ",(0,a.jsx)(e.code,{children:"#AST"}),", set this option to: ",(0,a.jsx)(e.code,{children:"false"})]}),"\n",(0,a.jsxs)(e.p,{children:["Additional information: ",(0,a.jsx)(e.a,{href:"https://parse5.js.org/interfaces/parse5.ParserOptions.html#scriptingenabled",children:"scriptingEnabled"})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sources"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token comment",children:"// Enables processing inside the <noscript> tag"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"scriptingEnabled"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"preprocessor"}),(0,a.jsx)(e.code,{children:"preprocessor"}),(0,a.jsx)(e.a,{href:"#preprocessor","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"preprocessor"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext",(0,a.jsx)(e.span,{className:"token operator",children:":"})," LoaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"undefined"})]}),"\n",(0,a.jsx)(e.p,{children:"Allows pre-processing of content before handling by the loader."}),"\n",(0,a.jsxs)(e.blockquote,{children:["\n",(0,a.jsx)(e.p,{children:"[!WARNING]"}),"\n",(0,a.jsx)(e.p,{children:"You should always return valid HTML."}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.hbs"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-hbs",children:'<div>\n  <p>{{firstname}} {{lastname}}</p>\n  <img src="image.png" alt="alt" />\n<div>\n'})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"function"}),(0,a.jsx)(e.code,{children:"function"}),(0,a.jsx)(e.a,{href:"#function","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["You can set the ",(0,a.jsx)(e.code,{children:"preprocessor"})," option as a ",(0,a.jsx)(e.code,{children:"function"})," instance."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," Handlebars ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"handlebars"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{classNam
1e:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.hbs$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"preprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"let"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"try"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              result ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," Handlebars",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"compile"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"firstname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"Value"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"lastname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"OtherValue"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"catch"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              loaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"emitError"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["You can also set the ",(0,a.jsx)(e.code,{children:"preprocessor"})," option as an asynchronous function instance."]}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," Handlebars ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"handlebars"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.hbs$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"preprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"async"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"let"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"try"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              result ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"await"})," Handlebars",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"compile"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"firstname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"Value"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"lastname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"OtherValue"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"catch"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"await"})," loaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"emitError"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"postprocessor"}),(0,a.jsx)(e.code,{children:"postprocessor"}),(0,a.jsx)(e.a,{href:"#postprocessor","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"postprocessor"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext",(0,a.jsx)(e.span,{className:"token operator",children:":"})," LoaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"string"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"undefined"})]}),"\n",(0,a.jsxs)(e.p,{children:["Allows post-processing of content after replacing all attributes (like ",(0,a.jsx)(e.code,{children:"src"}),"/",(0,a.jsx)(e.code,{children:"srcset"}),"/etc)."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.html"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-html",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"<%= 'Hello ' + (1+1) %/>",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"<%= require('./image.png') %>",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"<%= new URL('./image.png', import.meta.url) %>",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token t
1ag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"div"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"<%= require('./gallery.html').default %>",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"div"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"function-1"}),(0,a.jsx)(e.code,{children:"function"}),(0,a.jsx)(e.a,{href:"#function-1","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["You can set the ",(0,a.jsx)(e.code,{children:"postprocessor"})," option as a ",(0,a.jsx)(e.code,{children:"function"})," instance."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," Handlebars ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"handlebars"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"postprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token comment",children:"// When you environment supports template literals (using browserslist or options) we will generate code using them"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token number",children:"0"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"==="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"`"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"replaceAll"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"<%="'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"?"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"${"'})," ",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:"'\" +'"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"replaceAll"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"%>"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"?"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"}"'})," ",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:"'+ \"'"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["You can also set the ",(0,a.jsx)(e.code,{children:"postprocessor"})," option as an asynchronous ",(0,a.jsx)(e.code,{children:"function"})," instance."]}),"\n",(0,a.jsx)(e.p,{children:"For example:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," Handlebars ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"handlebars"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.hbs$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"postprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"async"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," value ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"await"})," ",(0,a.jsx)(e.span,{className:"token function",children:"getValue"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token comment",children:"// When you environment supports template literals (using browserslist or options) we will generate code using them"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token number",children:"0"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"==="})," ",(0,a.jsx)(e.span,{className:"token string",children:'"`"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"replaceAll"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"<%="'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"?"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"${"'})," ",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:"'\" +'"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"replaceAll"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"%>"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," isTemplateLiteralSupported ",(0,a.jsx)(e.span,{className:"token operator",children:"?"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"}"'})," ",(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:"'+ \"'"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"replace"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"my-value"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","})," value",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"minimize"}),(0,a.jsx)(e.code,{children:"minimize"}),(0,a.jsx)(e.a,{href:"#minimize","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"minimize"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="}),"\n  ",(0,a.jsx)(e.span,{className:"token operator",children:"|"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),"\n  ",(0,a.jsx)(e.span,{className:"token operator",children:"|"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n      caseSensitive",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      collapseWhitespace",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      conservativeCollapse",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      keepClosingSlash",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      minifyCSS",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",
1children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      minifyJS",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      removeComments",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      removeRedundantAttributes",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      removeScriptTypeAttributes",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n      removeStyleLinkTypeAttributes",(0,a.jsx)(e.span,{className:"token operator",children:"?"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"true"})," in production mode, otherwise ",(0,a.jsx)(e.code,{children:"false"})]}),"\n",(0,a.jsxs)(e.p,{children:["Use this option to enable or customize HTML minimization with ",(0,a.jsx)(e.code,{children:"html-loader"}),"."]}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"boolean-1"}),(0,a.jsx)(e.code,{children:"boolean"}),(0,a.jsx)(e.a,{href:"#boolean-1","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"The enabled rules for minimizing by default are the following ones:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"caseSensitive"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"collapseWhitespace"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"conservativeCollapse"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"keepClosingSlash"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"minifyCSS"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"minifyJS"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeComments"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeRedundantAttributes"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeScriptTypeAttributes"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeStyleLinkTypeAttributes"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"minimize"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h4,{children:[(0,a.jsx)(e.span,{id:"object-1"}),(0,a.jsx)(e.code,{children:"object"}),(0,a.jsx)(e.a,{href:"#object-1","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsxs)(e.p,{children:["See ",(0,a.jsx)(e.a,{href:"https://github.com/DanielRuf/html-minifier-terser",children:"html-minifier-terser"}),"'s documentation for more information on the available options."]}),"\n",(0,a.jsxs)(e.p,{children:["The default rules can be overridden using the following options in your ",(0,a.jsx)(e.code,{children:"webpack.config.js"})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"minimize"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeComments"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"collapseWhitespace"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:"The default rules can be extended:"}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"})," defaultMinimizerOptions ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"minimize"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token operator",children:"..."}),"defaultMinimizerOptions",(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"removeComments"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n            ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"collapseWhitespace"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,
1a.jsx)(e.span,{className:"token punctuation",children:","}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"esmodule"}),(0,a.jsx)(e.code,{children:"esModule"}),(0,a.jsx)(e.a,{href:"#esmodule","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"Type:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-ts",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"type"})," ",(0,a.jsx)(e.span,{className:"token class-name",children:"esModule"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token builtin",children:"boolean"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["Default: ",(0,a.jsx)(e.code,{children:"true"})]}),"\n",(0,a.jsxs)(e.p,{children:["By default, ",(0,a.jsx)(e.code,{children:"html-loader"})," generates JS modules that use the ES modules syntax.\nThere are some cases in which using ES modules is beneficial, such as ",(0,a.jsx)(e.a,{href:"/plugins/module-concatenation-plugin/",children:"module concatenation"})," and ",(0,a.jsx)(e.a,{href:"/guides/tree-shaking/",children:"tree shaking"}),"."]}),"\n",(0,a.jsxs)(e.p,{children:["If you want to generate CommonJS modules instead (e.g., ",(0,a.jsx)(e.code,{children:"module.exports ="}),"), set:"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"esModule"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"false"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h2,{children:[(0,a.jsx)(e.span,{id:"examples"}),"Examples",(0,a.jsx)(e.a,{href:"#examples","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"disable-url-resolving-using-the----webpackignore-true----comment"}),"Disable URL resolving using the ",(0,a.jsx)(e.code,{children:"\x3c!-- webpackIgnore: true --\x3e"})," comment",(0,a.jsx)(e.a,{href:"#disable-url-resolving-using-the----webpackignore-true----comment","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["Use the ",(0,a.jsx)(e.code,{children:"\x3c!-- webpackIgnore: true --\x3e"})," comment to prevent html-loader from processing URLs for the next HTML tag. This is useful when you don’t want Webpack to handle asset imports automatically."]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-html",children:[(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- Disabled url handling for the src attribute --\x3e"}),"\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- webpackIgnore: true --\x3e"}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- Disabled url handling for the src and srcset attributes --\x3e"}),"\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- webpackIgnore: true --\x3e"}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]}),"\n  ",(0,a.jsx)(e.span,{className:"token attr-name",children:"srcset"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.png 480w, image.png 768w",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]}),"\n  ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]}),"\n  ",(0,a.jsx)(e.span,{className:"token attr-name",children:"alt"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"Elva dressed as a fairy",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- Disabled url handling for the content attribute --\x3e"}),"\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- webpackIgnore: true --\x3e"}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"meta"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"itemprop"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"content"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"./image.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- Disabled url handling for the href attribute --\x3e"}),"\n",(0,a.jsx)(e.span,{className:"token comment",children:"\x3c!-- webpackIgnore: true --\x3e"}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"link"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"rel"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"icon",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"type"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image/png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"sizes"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"192x192",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"href"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"./image.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"roots"}),"roots",(0,a.jsx)(e.a,{href:"#roots","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["With ",(0,a.jsx)(e.a,{href:"/configuration/resolve/#resolveroots",children:(0,a.jsx)(e.code,{children:"resolve.roots"})})," one can specify a list of directories where requests of server-relative URLs (starting with '/') are resolved."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"context"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," __dirname",(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.jpg$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"resolve"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"roots"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"path",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"resolve"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"__dirname",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," ",(0,a.jsx)(e.
1span,{className:"token string",children:'"fixtures"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.html"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-html",children:(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"/image.jpg",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]})})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-js",children:(0,a.jsx)(e.span,{className:"token comment",children:"// => image.jpg in __dirname/fixtures will be resolved"})})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"cdn"}),"CDN",(0,a.jsx)(e.a,{href:"#cdn","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.jpg$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.png$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/inline"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"output"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"publicPath"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"http://cdn.example.com/[fullhash]/"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.html"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-html",children:(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.jpg",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"data-src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image2x.png",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]})})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"index.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"html-loader!./file.html"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:'// => \'<img src="http://cdn.example.com/49eba9f/a992ca.jpg" data-src="image2x.png"/>\''})]})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'\'html-loader?{"sources":{"list":[{"tag":"img","attribute":"data-src","type":"src"}]}}!./file.html\''}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:'// => \'<img src="image.jpg" data-src="data:image/png;base64,..." />\''})]})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'\'html-loader?{"sources":{"list":[{"tag":"img","attribute":"src","type":"src"},{"tag":"img","attribute":"data-src","type":"src"}]}}!./file.html\''}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n",(0,a.jsx)(e.span,{className:"token comment",children:'// => \'<img src="http://cdn.example.com/49eba9f/a992ca.jpg" data-src="data:image/png;base64,..." />\''})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"process-script-and-link-tags"}),"Process ",(0,a.jsx)(e.code,{children:"script"})," and ",(0,a.jsx)(e.code,{children:"link"})," tags",(0,a.jsx)(e.a,{href:"#process-script-and-link-tags","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"script.file.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["console",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"log"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"document",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"style.file.css"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-css",children:[(0,a.jsx)(e.span,{className:"token selector",children:"a"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token property",children:"color"}),(0,a.jsx)(e.span,{className:"token punctuation",children:":"})," red",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.html"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-html",children:[(0,a.jsxs)(e.span,{className:"token doctype",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<!"}),(0,a.jsx)(e.span,{className:"token doctype-tag",children:"doctype"})," ",(0,a.jsx)(e.span,{className:"token name",children:"html"}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"html"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n  ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"head"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n    ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"meta"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"charset"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"UTF-8",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n    ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"title"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"Title of the document",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"title"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n    ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"link"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"rel"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"stylesheet",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"type"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"text/css",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"href"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"./style.file.css",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]}),"\n  ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"head"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n  ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"body"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n    Content of the document......\n    ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"script"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"./script.file.js",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"script"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n  ",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"body"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]}),"\n",(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"</"}),"html"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:">"})]})]})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{cl
1assName:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"generator"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"filename"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"[name][ext]"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"use"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.js$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"exclude"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.file.js$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"babel-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.file.js$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.css$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"exclude"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.file.css$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"css-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.file.css$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"templating"}),"Templating",(0,a.jsx)(e.a,{href:"#templating","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:"You can use any templating engine by leveraging the preprocessor option in html-loader. The preprocessor function receives the file content and the loader context, allowing you to transform the HTML before it’s processed by webpack."}),"\n",(0,a.jsxs)(e.p,{children:["Below is an example for ",(0,a.jsx)(e.a,{href:"https://handlebarsjs.com/",children:"handlebars"}),"."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.hbs"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-hbs",children:'<div>\n  <p>{{firstname}} {{lastname}}</p>\n  <img src="image.png" alt="alt" />\n<div>\n'})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," Handlebars ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"handlebars"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.hbs$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"preprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"let"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"try"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              result ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," Handlebars",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"compile"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"firstname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"Value"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n                ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"lastname"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"OtherValue"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n              ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"catch"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              loaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"emitError"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.p,{children:["This setup will transform the ",(0,a.jsx)(e.code,{children:"file.hbs"})," template using Handlebars before passing the result to ",(0,a.jsx)(e.code,{children:"html-loader"}),"."]}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"posthtml"}),"PostHTML",(0,a.jsx)(e.a,{href:"#posthtml","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsxs)(e.p,{children:["You can use ",(0,a.jsx)(e.a,{href:"https://github.com/posthtml/p
1osthtml",children:"PostHTML"})," to transform HTML before it's processed, without needing additional loaders.\nThis is useful for tasks like converting image formats, adding attributes, or restructuring markup."]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"file.html"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"hljs language-html",children:(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsxs)(e.span,{className:"token tag",children:[(0,a.jsx)(e.span,{className:"token punctuation",children:"<"}),"img"]})," ",(0,a.jsx)(e.span,{className:"token attr-name",children:"src"}),(0,a.jsxs)(e.span,{className:"token attr-value",children:[(0,a.jsx)(e.span,{className:"token punctuation attr-equals",children:"="}),(0,a.jsx)(e.span,{className:"token punctuation",children:'"'}),"image.jpg",(0,a.jsx)(e.span,{className:"token punctuation",children:'"'})]})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"/>"})]})})}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:[(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," posthtml ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"posthtml"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n",(0,a.jsx)(e.span,{className:"token keyword",children:"const"})," posthtmlWebp ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"require"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token string",children:'"posthtml-webp"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\nmodule",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.hbs$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"loader"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"options"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token function-variable function",children:"preprocessor"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsxs)(e.span,{className:"token parameter",children:["content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," loaderContext"]}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token operator",children:"=>"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"let"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"try"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              result ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token function",children:"posthtml"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"use"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"plugin",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"process"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"content",(0,a.jsx)(e.span,{className:"token punctuation",children:","})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"})," ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"sync"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token boolean",children:"true"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"})," ",(0,a.jsx)(e.span,{className:"token keyword",children:"catch"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n              loaderContext",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),(0,a.jsx)(e.span,{className:"token function",children:"emitError"}),(0,a.jsx)(e.span,{className:"token punctuation",children:"("}),"error",(0,a.jsx)(e.span,{className:"token punctuation",children:")"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n\n              ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," content",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n            ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),"\n\n            ",(0,a.jsx)(e.span,{className:"token keyword",children:"return"})," result",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"html",(0,a.jsx)(e.span,{className:"token punctuation",children:";"}),"\n          ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h3,{children:[(0,a.jsx)(e.span,{id:"export-into-html-files"}),"Export into HTML files",(0,a.jsx)(e.a,{href:"#export-into-html-files","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}
1),"\n",(0,a.jsxs)(e.p,{children:["A very common scenario is exporting the HTML into their own ",(0,a.jsx)(e.em,{children:".html"})," file, to serve them directly instead of injecting with javascript.\nThis can be achieved with a combination of html-loader and ",(0,a.jsx)(e.a,{href:"/guides/asset-modules/",children:(0,a.jsx)(e.code,{children:"asset modules"})}),"."]}),"\n",(0,a.jsxs)(e.p,{children:["The html-loader will parse the URLs, require the images and everything you\nexpect. The extract loader will parse the javascript back into a proper html\nfile, ensuring images are required and point to proper path, and the ",(0,a.jsx)(e.a,{href:"/guides/asset-modules/",children:(0,a.jsx)(e.code,{children:"asset modules"})}),"\nwill write the ",(0,a.jsx)(e.em,{children:".html"})," file for you. Example:"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.strong,{children:"webpack.config.js"})}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsxs)(e.code,{className:"hljs language-js",children:["module",(0,a.jsx)(e.span,{className:"token punctuation",children:"."}),"exports ",(0,a.jsx)(e.span,{className:"token operator",children:"="})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"output"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"assetModuleFilename"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"[name][ext]"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"module"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n    ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"rules"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"type"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"asset/resource"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"generator"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n          ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"filename"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token string",children:'"[name][ext]"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"{"}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"test"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsxs)(e.span,{className:"token regex",children:[(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-source language-regex",children:"\\.html$"}),(0,a.jsx)(e.span,{className:"token regex-delimiter",children:"/"}),(0,a.jsx)(e.span,{className:"token regex-flags",children:"i"})]}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n        ",(0,a.jsx)(e.span,{className:"token literal-property property",children:"use"}),(0,a.jsx)(e.span,{className:"token operator",children:":"})," ",(0,a.jsx)(e.span,{className:"token punctuation",children:"["}),(0,a.jsx)(e.span,{className:"token string",children:'"html-loader"'}),(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n      ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n    ",(0,a.jsx)(e.span,{className:"token punctuation",children:"]"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n  ",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:","}),"\n",(0,a.jsx)(e.span,{className:"token punctuation",children:"}"}),(0,a.jsx)(e.span,{className:"token punctuation",children:";"})]})}),"\n",(0,a.jsxs)(e.h2,{children:[(0,a.jsx)(e.span,{id:"contributing"}),"Contributing",(0,a.jsx)(e.a,{href:"#contributing","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}
1),"\n",(0,a.jsx)(e.p,{children:"We welcome all contributions!\nIf you're new here, please take a moment to review our contributing guidelines before submitting issues or pull requests."}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.a,{href:"https://github.com/webpack/html-loader?tab=contributing-ov-file#contributing",children:"CONTRIBUTING"})}),"\n",(0,a.jsxs)(e.h2,{children:[(0,a.jsx)(e.span,{id:"license"}),"License",(0,a.jsx)(e.a,{href:"#license","aria-hidden":"true",tabIndex:"-1",children:(0,a.jsx)(e.span,{className:"header-link"})})]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.a,{href:"https://github.com/webpack/html-loader/main/LICENSE",children:"MIT"})})]})}function l(n={}){const{wrapper:e}={...(0,t.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(c,{...n})}):c(n)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.