@utoo/pack 1.1.10 → 1.1.11
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/cjs/commands/dev.js +4 -1
- package/cjs/utils/html-entry.js +4 -4
- package/esm/commands/dev.js +4 -1
- package/esm/utils/html-entry.js +4 -4
- package/package.json +9 -9
package/cjs/commands/dev.js
CHANGED
|
@@ -69,7 +69,10 @@ async function serveInternal(options, projectPath, rootPath, serverOptions) {
|
|
|
69
69
|
...options,
|
|
70
70
|
config: {
|
|
71
71
|
...options.config,
|
|
72
|
-
devServer: {
|
|
72
|
+
devServer: {
|
|
73
|
+
...(options.config.devServer || {}),
|
|
74
|
+
hot: true,
|
|
75
|
+
},
|
|
73
76
|
},
|
|
74
77
|
packPath: (0, common_1.getPackPath)(),
|
|
75
78
|
}, projectPath || process.cwd(), rootPath);
|
package/cjs/utils/html-entry.js
CHANGED
|
@@ -23,6 +23,10 @@ function processHtmlEntry(config, projectPath) {
|
|
|
23
23
|
const src = script.getAttribute("src");
|
|
24
24
|
if (src && !src.startsWith("http") && !src.startsWith("//")) {
|
|
25
25
|
const scriptPath = path_1.default.join(path_1.default.dirname(entry.import), src);
|
|
26
|
+
// Remove the origin script tag from the DOM
|
|
27
|
+
if (script.parentNode) {
|
|
28
|
+
script.parentNode.removeChild(script);
|
|
29
|
+
}
|
|
26
30
|
newEntries.push({
|
|
27
31
|
import: scriptPath,
|
|
28
32
|
html: {
|
|
@@ -31,10 +35,6 @@ function processHtmlEntry(config, projectPath) {
|
|
|
31
35
|
filename: path_1.default.basename(entry.import),
|
|
32
36
|
},
|
|
33
37
|
});
|
|
34
|
-
// Remove the script tag from the DOM
|
|
35
|
-
if (script.parentNode) {
|
|
36
|
-
script.parentNode.removeChild(script);
|
|
37
|
-
}
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
return false;
|
package/esm/commands/dev.js
CHANGED
|
@@ -55,7 +55,10 @@ async function serveInternal(options, projectPath, rootPath, serverOptions) {
|
|
|
55
55
|
...options,
|
|
56
56
|
config: {
|
|
57
57
|
...options.config,
|
|
58
|
-
devServer: {
|
|
58
|
+
devServer: {
|
|
59
|
+
...(options.config.devServer || {}),
|
|
60
|
+
hot: true,
|
|
61
|
+
},
|
|
59
62
|
},
|
|
60
63
|
packPath: getPackPath(),
|
|
61
64
|
}, projectPath || process.cwd(), rootPath);
|
package/esm/utils/html-entry.js
CHANGED
|
@@ -17,6 +17,10 @@ export function processHtmlEntry(config, projectPath) {
|
|
|
17
17
|
const src = script.getAttribute("src");
|
|
18
18
|
if (src && !src.startsWith("http") && !src.startsWith("//")) {
|
|
19
19
|
const scriptPath = path.join(path.dirname(entry.import), src);
|
|
20
|
+
// Remove the origin script tag from the DOM
|
|
21
|
+
if (script.parentNode) {
|
|
22
|
+
script.parentNode.removeChild(script);
|
|
23
|
+
}
|
|
20
24
|
newEntries.push({
|
|
21
25
|
import: scriptPath,
|
|
22
26
|
html: {
|
|
@@ -25,10 +29,6 @@ export function processHtmlEntry(config, projectPath) {
|
|
|
25
29
|
filename: path.basename(entry.import),
|
|
26
30
|
},
|
|
27
31
|
});
|
|
28
|
-
// Remove the script tag from the DOM
|
|
29
|
-
if (script.parentNode) {
|
|
30
|
-
script.parentNode.removeChild(script);
|
|
31
|
-
}
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utoo/pack",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.11",
|
|
4
4
|
"main": "cjs/index.js",
|
|
5
5
|
"module": "esm/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/code-frame": "7.22.5",
|
|
41
41
|
"@swc/helpers": "0.5.15",
|
|
42
|
-
"@utoo/pack-shared": "1.1.
|
|
42
|
+
"@utoo/pack-shared": "1.1.11",
|
|
43
43
|
"@utoo/style-loader": "^1.0.0",
|
|
44
44
|
"domparser-rs": "^0.0.5",
|
|
45
45
|
"find-up": "4.1.0",
|
|
@@ -88,12 +88,12 @@
|
|
|
88
88
|
},
|
|
89
89
|
"repository": "git@github.com:utooland/utoo.git",
|
|
90
90
|
"optionalDependencies": {
|
|
91
|
-
"@utoo/pack-darwin-arm64": "1.1.
|
|
92
|
-
"@utoo/pack-darwin-x64": "1.1.
|
|
93
|
-
"@utoo/pack-linux-arm64-gnu": "1.1.
|
|
94
|
-
"@utoo/pack-linux-arm64-musl": "1.1.
|
|
95
|
-
"@utoo/pack-linux-x64-gnu": "1.1.
|
|
96
|
-
"@utoo/pack-linux-x64-musl": "1.1.
|
|
97
|
-
"@utoo/pack-win32-x64-msvc": "1.1.
|
|
91
|
+
"@utoo/pack-darwin-arm64": "1.1.11",
|
|
92
|
+
"@utoo/pack-darwin-x64": "1.1.11",
|
|
93
|
+
"@utoo/pack-linux-arm64-gnu": "1.1.11",
|
|
94
|
+
"@utoo/pack-linux-arm64-musl": "1.1.11",
|
|
95
|
+
"@utoo/pack-linux-x64-gnu": "1.1.11",
|
|
96
|
+
"@utoo/pack-linux-x64-musl": "1.1.11",
|
|
97
|
+
"@utoo/pack-win32-x64-msvc": "1.1.11"
|
|
98
98
|
}
|
|
99
99
|
}
|