@utoo/pack 1.4.2 → 1.4.3-alpha.1

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.
@@ -111,7 +111,9 @@ class HtmlPlugin {
111
111
  });
112
112
  const finalHtml = doc.outerHTML;
113
113
  const filename = this.config.filename || "index.html";
114
- fs_1.default.writeFileSync(path_1.default.join((_b = (_a = this.config.output) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : outputDir, filename), finalHtml);
114
+ const finalOutputDir = (_b = (_a = this.config.output) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : outputDir;
115
+ fs_1.default.mkdirSync(finalOutputDir, { recursive: true });
116
+ fs_1.default.writeFileSync(path_1.default.join(finalOutputDir, filename), finalHtml);
115
117
  }
116
118
  }
117
119
  exports.HtmlPlugin = HtmlPlugin;
@@ -105,6 +105,8 @@ export class HtmlPlugin {
105
105
  });
106
106
  const finalHtml = doc.outerHTML;
107
107
  const filename = this.config.filename || "index.html";
108
- fs.writeFileSync(path.join((_b = (_a = this.config.output) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : outputDir, filename), finalHtml);
108
+ const finalOutputDir = (_b = (_a = this.config.output) === null || _a === void 0 ? void 0 : _a.path) !== null && _b !== void 0 ? _b : outputDir;
109
+ fs.mkdirSync(finalOutputDir, { recursive: true });
110
+ fs.writeFileSync(path.join(finalOutputDir, filename), finalHtml);
109
111
  }
110
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utoo/pack",
3
- "version": "1.4.2",
3
+ "version": "1.4.3-alpha.1",
4
4
  "main": "cjs/index.js",
5
5
  "module": "esm/index.js",
6
6
  "types": "esm/index.d.ts",
@@ -41,7 +41,7 @@
41
41
  "@hono/node-server": "^1.19.11",
42
42
  "@hono/node-ws": "^1.3.0",
43
43
  "@swc/helpers": "0.5.15",
44
- "@utoo/pack-shared": "1.4.2",
44
+ "@utoo/pack-shared": "1.4.3-alpha.1",
45
45
  "domparser-rs": "^0.0.7",
46
46
  "find-up": "4.1.0",
47
47
  "get-port": "5.1.1",
@@ -92,12 +92,12 @@
92
92
  },
93
93
  "repository": "git@github.com:utooland/utoo.git",
94
94
  "optionalDependencies": {
95
- "@utoo/pack-darwin-arm64": "1.4.2",
96
- "@utoo/pack-darwin-x64": "1.4.2",
97
- "@utoo/pack-linux-arm64-gnu": "1.4.2",
98
- "@utoo/pack-linux-arm64-musl": "1.4.2",
99
- "@utoo/pack-linux-x64-gnu": "1.4.2",
100
- "@utoo/pack-linux-x64-musl": "1.4.2",
101
- "@utoo/pack-win32-x64-msvc": "1.4.2"
95
+ "@utoo/pack-darwin-arm64": "1.4.3-alpha.1",
96
+ "@utoo/pack-darwin-x64": "1.4.3-alpha.1",
97
+ "@utoo/pack-linux-arm64-gnu": "1.4.3-alpha.1",
98
+ "@utoo/pack-linux-arm64-musl": "1.4.3-alpha.1",
99
+ "@utoo/pack-linux-x64-gnu": "1.4.3-alpha.1",
100
+ "@utoo/pack-linux-x64-musl": "1.4.3-alpha.1",
101
+ "@utoo/pack-win32-x64-msvc": "1.4.3-alpha.1"
102
102
  }
103
103
  }