html-bundle 6.0.6 → 6.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils.mjs +2 -1
- package/package.json +7 -7
- package/src/utils.mts +2 -1
package/dist/utils.mjs
CHANGED
|
@@ -207,7 +207,8 @@ function getHMRCode(file, id, src) {
|
|
|
207
207
|
for (const key of elem.getAttributeNames()) {
|
|
208
208
|
clone.setAttribute(key, elem.getAttribute(key));
|
|
209
209
|
}
|
|
210
|
-
|
|
210
|
+
const attrVal = elem.getAttribute(attr);
|
|
211
|
+
if (attrVal) clone.setAttribute(attr, attrVal + "?v=" + String(Math.random().toFixed(4)).slice(2));
|
|
211
212
|
render(clone, elem, false);
|
|
212
213
|
}
|
|
213
214
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "html-bundle",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.7",
|
|
4
4
|
"description": "A very simple bundler for HTML SFC",
|
|
5
5
|
"bin": "./dist/bundle.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/html-minifier-terser": "^6.1.0",
|
|
24
24
|
"@types/parse5": "^6.0.3",
|
|
25
25
|
"@types/postcss-load-config": "^3.0.1",
|
|
26
|
-
"typescript": "^4.5.
|
|
26
|
+
"typescript": "^4.5.5"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
29
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@web/parse5-utils": "^1.3.0",
|
|
35
35
|
"await-spawn": "^4.0.2",
|
|
36
|
-
"chokidar": "^3.5.
|
|
36
|
+
"chokidar": "^3.5.3",
|
|
37
37
|
"critical": "^4.0.1",
|
|
38
|
-
"cssnano": "^5.0.
|
|
39
|
-
"esbuild": "^0.14.
|
|
40
|
-
"fastify": "^3.
|
|
38
|
+
"cssnano": "^5.0.16",
|
|
39
|
+
"esbuild": "^0.14.14",
|
|
40
|
+
"fastify": "^3.27.0",
|
|
41
41
|
"fastify-static": "^4.5.0",
|
|
42
42
|
"glob": "^7.2.0",
|
|
43
43
|
"html-minifier-terser": "^6.1.0",
|
|
44
|
-
"hydro-js": "^1.5.
|
|
44
|
+
"hydro-js": "^1.5.10",
|
|
45
45
|
"parse5": "^6.0.1",
|
|
46
46
|
"postcss": "^8.4.5",
|
|
47
47
|
"postcss-load-config": "^3.1.1"
|
package/src/utils.mts
CHANGED
|
@@ -243,7 +243,8 @@ function getHMRCode(file: string, id: string, src: string) {
|
|
|
243
243
|
for (const key of elem.getAttributeNames()) {
|
|
244
244
|
clone.setAttribute(key, elem.getAttribute(key));
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
const attrVal = elem.getAttribute(attr);
|
|
247
|
+
if (attrVal) clone.setAttribute(attr, attrVal + "?v=" + String(Math.random().toFixed(4)).slice(2));
|
|
247
248
|
render(clone, elem, false);
|
|
248
249
|
}
|
|
249
250
|
});
|