1 | # Changelog
|
2 |
|
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
4 |
|
5 | ### [2.1.1](https://github.com/webpack-contrib/html-loader/compare/v2.1.0...v2.1.1) (2021-02-24)
|
6 |
|
7 |
|
8 | ### Bug Fixes
|
9 |
|
10 | * handle the `content` attribute ([#372](https://github.com/webpack-contrib/html-loader/issues/372)) ([002e2a1](https://github.com/webpack-contrib/html-loader/commit/002e2a144c26601136cca1073cd84f1a18e67033))
|
11 | * invalid URL for runtime helpers ([#373](https://github.com/webpack-contrib/html-loader/issues/373)) ([b19cfd0](https://github.com/webpack-contrib/html-loader/commit/b19cfd0e9344f15edf69df58afd8def96436b11d))
|
12 |
|
13 | ## [2.1.0](https://github.com/webpack-contrib/html-loader/compare/v2.0.0...v2.1.0) (2021-02-20)
|
14 |
|
15 |
|
16 | ### Features
|
17 |
|
18 | * added support webpackIgnore comment ([#366](https://github.com/webpack-contrib/html-loader/issues/366)) ([ab57a28](https://github.com/webpack-contrib/html-loader/commit/ab57a28b6e27acfc75ad3f398ef916c780872ca0))
|
19 |
|
20 | ## [2.0.0](https://github.com/webpack-contrib/html-loader/compare/v1.3.2...v2.0.0) (2021-02-14)
|
21 |
|
22 |
|
23 | ### ⚠ BREAKING CHANGES
|
24 |
|
25 | * `new URL('./source.ext', import.meta.url)` syntax is using for importing `sources` (i.e. `src`/`srcset`/etc) and the `esModule` option is `true` by default, you can disable it by setting the `esModule` option to `false`
|
26 | * rename the `attributes` option to `sources`
|
27 | * the `attributes.root` option was removed in favor [`resolve.roots`](https://webpack.js.org/configuration/resolve/#resolveroots)
|
28 | * minimum supported `webpack` version is `5`
|
29 | * migrate from `htmlparser2` to `parse5`
|
30 |
|
31 | ### Features
|
32 |
|
33 | * handle more attribute for `meta` and `link` tags ([348e4f5](https://github.com/webpack-contrib/html-loader/commit/348e4f5693d77cd5900e824ec13d730dc16c7e8f))
|
34 | * allow to disable default sources ([#351](https://github.com/webpack-contrib/html-loader/issues/351)) ([480656f](https://github.com/webpack-contrib/html-loader/commit/480656f5bdd448cfa043391a0aab67b1cbd84f18))
|
35 |
|
36 | ### Bug Fixes
|
37 |
|
38 | * broken `src` with `#hash` ([#342](https://github.com/webpack-contrib/html-loader/issues/342)) ([d6590b0](https://github.com/webpack-contrib/html-loader/commit/d6590b081cb19ffb1fd397675977dda0b9dd04b9))
|
39 | * handle `\` character ([#353](https://github.com/webpack-contrib/html-loader/issues/353)) ([c124fae](https://github.com/webpack-contrib/html-loader/commit/c124faee3b20362b78fed26700c271a4bbe54852))
|
40 | * pass hash from request to other loaders ([#349](https://github.com/webpack-contrib/html-loader/issues/349)) ([e97d3c8](https://github.com/webpack-contrib/html-loader/commit/e97d3c858c70b9e13d4818b5f2ef2ac2d15df778))
|
41 |
|
42 | ### [1.3.2](https://github.com/webpack-contrib/html-loader/compare/v1.3.1...v1.3.2) (2020-10-09)
|
43 |
|
44 | ### Chore
|
45 |
|
46 | * update `schema-utils`
|
47 |
|
48 | ### [1.3.1](https://github.com/webpack-contrib/html-loader/compare/v1.3.0...v1.3.1) (2020-09-21)
|
49 |
|
50 |
|
51 | ### Bug Fixes
|
52 |
|
53 | * avoid removing redundant attributes ([#324](https://github.com/webpack-contrib/html-loader/issues/324)) ([ab299ac](https://github.com/webpack-contrib/html-loader/commit/ab299acd8784f96f9191988133fb74f72aaf89c8))
|
54 |
|
55 | ## [1.3.0](https://github.com/webpack-contrib/html-loader/compare/v1.2.1...v1.3.0) (2020-08-25)
|
56 |
|
57 |
|
58 | ### Features
|
59 |
|
60 | * `...` syntax to extend default tag and attributes ([#317](https://github.com/webpack-contrib/html-loader/issues/317)) ([f02bb48](https://github.com/webpack-contrib/html-loader/commit/f02bb48a1124fc567b858234b1cf3d3e68bb6c76))
|
61 |
|
62 |
|
63 | ### Bug Fixes
|
64 |
|
65 | * handle `script` tags in SVG ([#315](https://github.com/webpack-contrib/html-loader/issues/315)) ([d021e42](https://github.com/webpack-contrib/html-loader/commit/d021e42fc830d36cf2ab3e9d483fd5723af23ba8))
|
66 |
|
67 | ### [1.2.1](https://github.com/webpack-contrib/html-loader/compare/v1.2.0...v1.2.1) (2020-08-19)
|
68 |
|
69 |
|
70 | ### Bug Fixes
|
71 |
|
72 | * ignore template sources ([#314](https://github.com/webpack-contrib/html-loader/issues/314)) ([078d9bd](https://github.com/webpack-contrib/html-loader/commit/078d9bdc36d256d6a78ab0ae9b8ccddbef11393c))
|
73 |
|
74 | ## [1.2.0](https://github.com/webpack-contrib/html-loader/compare/v1.1.0...v1.2.0) (2020-08-18)
|
75 |
|
76 |
|
77 | ### Features
|
78 |
|
79 | * support SVG tags ([#302](https://github.com/webpack-contrib/html-loader/issues/302)) ([1acd204](https://github.com/webpack-contrib/html-loader/commit/1acd20448dbe976b883597b135bb8ac9e1b71d1a))
|
80 |
|
81 |
|
82 | ### Bug Fixes
|
83 |
|
84 | * do not handle non standard `script` types ([ddad9f2](https://github.com/webpack-contrib/html-loader/commit/ddad9f2d6f5ab75fe2afd247bf55b1646c6e1c31))
|
85 | * inline syntax for sources ([#310](https://github.com/webpack-contrib/html-loader/issues/310)) ([c247cfa](https://github.com/webpack-contrib/html-loader/commit/c247cfa9ad66281b28aef5397c8c2d2786f05867))
|
86 | * linefeed characters in sources ([#311](https://github.com/webpack-contrib/html-loader/issues/311)) ([b8ee9ee](https://github.com/webpack-contrib/html-loader/commit/b8ee9ee0d60848e84e52fb117c1f3cdc2ebf08d7))
|
87 | * minimize is more safely ([#304](https://github.com/webpack-contrib/html-loader/issues/304)) ([03152b1](https://github.com/webpack-contrib/html-loader/commit/03152b1d3b807a287d84302f6a9987ceb22d395c))
|
88 | * perf ([#300](https://github.com/webpack-contrib/html-loader/issues/300)) ([d69f259](https://github.com/webpack-contrib/html-loader/commit/d69f259d2a6b4bc9ba9c163fd2d70989c3f3a6ff))
|
89 |
|
90 | ## [1.1.0](https://github.com/webpack-contrib/html-loader/compare/v1.0.0...v1.1.0) (2020-04-02)
|
91 |
|
92 |
|
93 | ### Features
|
94 |
|
95 | * added support for an async functions to the `preprocessor` option ([#272](https://github.com/webpack-contrib/html-loader/issues/272)) ([e59324b](https://github.com/webpack-contrib/html-loader/commit/e59324b929557a9e1da5e1713748351cf37efdb1))
|
96 | * allowed to handle an attribute without a tag ([#273](https://github.com/webpack-contrib/html-loader/issues/273)) ([c0d6d5b](https://github.com/webpack-contrib/html-loader/commit/c0d6d5b9338af219a5cd81779ee2bcd9254420ed))
|
97 |
|
98 |
|
99 | ### Bug Fixes
|
100 |
|
101 | * hash processing improved ([#275](https://github.com/webpack-contrib/html-loader/issues/275)) ([74d2c60](https://github.com/webpack-contrib/html-loader/commit/74d2c607c519bdaad995a51e74b6317c8cfaad14))
|
102 |
|
103 | ## [1.0.0](https://github.com/ryanclark/html-loader/compare/v0.5.5...v1.0.0) (2020-03-19)
|
104 |
|
105 |
|
106 | ### ⚠ BREAKING CHANGES
|
107 |
|
108 | * for parsing HTML now we use `htmlparser2` package
|
109 | * the `attrs` option was renamed to the `attributes` option
|
110 | * the `interpolate` option was removed, please consider migration on the [`preprocessor`](https://github.com/webpack-contrib/html-loader#preprocessor)
|
111 | * the `minimize` option is `true` by default in `production` mode. You need to list all options for `html-minifier` if you use `object` notation.
|
112 | * uppercase tags and uppercase attributes are handled by default
|
113 | * the `root` option was moved under the `attributes` option, please look at the [documentation](https://github.com/webpack-contrib/html-loader#object)
|
114 | * emit an error on broken HTML syntax when minimization is enabled
|
115 | * By default, now we process the following tags with attributes:
|
116 | * the `src` attribute of the `audio` tag
|
117 | * the `src` attribute of the `embed` tag
|
118 | * the `src` attribute of the `img` tag
|
119 | * the `srcset` attribute of the `img` tag
|
120 | * the `src` attribute of the `input` tag
|
121 | * the `href` attribute of the `link` tag (only for stylesheets)
|
122 | * the `data` attribute of the `object` tag
|
123 | * the `src` attribute of the `script` tag
|
124 | * the `src` attribute of the `source` tag
|
125 | * the `srcset` attribute of the `source` tag
|
126 | * the `src` attribute of the `track` tag
|
127 | * the `poster` attribute of the `video` tag
|
128 | * the `src` attribute of the `video` tag
|
129 | * the `attributes` option should be `Boolean` or `Object`, please look at the [documentation](https://github.com/webpack-contrib/html-loader#object)
|
130 | * the `exportAsDefault` option were removed in favor the `esModules` option
|
131 | * the `exportAsEs6Default` option were removed in favor the `esModules` option
|
132 |
|
133 | ### Features
|
134 |
|
135 | * handle more tags and attributes
|
136 | * added the `preprocessor` option
|
137 | * added the `esModule` option
|
138 | * add the `rulFilter` option for filtering some of urls, please look at the [documentation](https://github.com/webpack-contrib/html-loader#urlfilter)
|
139 | * allow to setup how to handle and filter tags and attributes, please look at the [documentation](https://github.com/webpack-contrib/html-loader#list)
|
140 | * improve error reporting
|
141 |
|
142 | ### Bug Fixes
|
143 |
|
144 | * adding quotes when necessary for unquoted sources
|
145 | * do not handle empty attributes
|
146 | * escape `\u2028` and `\u2029` characters
|
147 | * handle only valid srcset tags
|
148 | * parser tags and attributes according spec
|
149 | * reduce `import`/`require` count
|
150 | * reduce size of generated modules
|
151 | * respect `#hash` in sources
|
152 | * support ES6 syntax in `script` tags when minimize
|
153 | * support ES6 import of urls
|
154 |
|
155 | <a name="0.5.5"></a>
|
156 | ## [0.5.5](https://github.com/webpack-contrib/html-loader/compare/v0.5.4...v0.5.5) (2018-01-17)
|
157 |
|
158 |
|
159 | ### Bug Fixes
|
160 |
|
161 | * **index:** don't prepend `./` to the URL on `interpolate=require` (`options.interpolate`) ([#165](https://github.com/webpack-contrib/html-loader/issues/165)) ([9515410](https://github.com/webpack-contrib/html-loader/commit/9515410))
|
162 |
|
163 |
|
164 |
|
165 | <a name="0.5.4"></a>
|
166 | ## [0.5.4](https://github.com/webpack-contrib/html-loader/compare/v0.5.1...v0.5.4) (2018-01-05)
|
167 |
|
168 |
|
169 | ### Bug Fixes
|
170 |
|
171 | * ignore attribute if `mailto:` is present ([#145](https://github.com/webpack-contrib/html-loader/issues/145)) ([4b13d4c](https://github.com/webpack-contrib/html-loader/commit/4b13d4c))
|
172 | * **index:** escape double quotes correctly (`options.interpolate`) ([#154](https://github.com/webpack-contrib/html-loader/issues/154)) ([1ef5de4](https://github.com/webpack-contrib/html-loader/commit/1ef5de4))
|
173 |
|
174 |
|
175 | <a name="0.5.1"></a>
|
176 | ## [0.5.1](https://github.com/webpack/html-loader/compare/v0.5.0...v0.5.1) (2017-08-08)
|
177 |
|
178 |
|
179 | ### Bug Fixes
|
180 |
|
181 | * Support for empty tags in tag-attribute matching ([#133](https://github.com/webpack/html-loader/issues/133)) ([6efa6de](https://github.com/webpack/html-loader/commit/6efa6de)), closes [#129](https://github.com/webpack/html-loader/issues/129)
|
182 |
|
183 |
|
184 |
|
185 | <a name="0.5.0"></a>
|
186 | # [0.5.0](https://github.com/webpack/html-loader/compare/v0.4.3...v0.5.0) (2017-07-26)
|
187 |
|
188 |
|
189 | ### Features
|
190 |
|
191 | * add support for empty tags in `tag:attribute` matching ([#129](https://github.com/webpack/html-loader/issues/129)) ([70370dc](https://github.com/webpack/html-loader/commit/70370dc))
|
192 |
|
193 |
|
194 | <a name="0.4.5"></a>
|
195 | ## [0.4.5](https://github.com/webpack/html-loader/compare/v0.4.3...v0.4.5) (2017-07-26)
|
196 |
|
197 |
|
198 | ### Bug Fixes
|
199 |
|
200 | * es6 default export ([fae0309](https://github.com/webpack/html-loader/commit/fae0309))
|
201 | * Handle es6 default export ([e04e969](https://github.com/webpack/html-loader/commit/e04e969))
|
202 | * **getOptions:** deprecation warn in loaderUtils ([#114](https://github.com/webpack/html-loader/issues/114)) ([3d47e98](https://github.com/webpack/html-loader/commit/3d47e98))
|
203 |
|
204 |
|
205 | ### Features
|
206 |
|
207 | * Adds exportAsDefault ([37d40d8](https://github.com/webpack/html-loader/commit/37d40d8))
|