minista 3.1.9 → 3.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/dist/cli/build.js CHANGED
@@ -5,7 +5,8 @@ import {
5
5
  defineConfig as defineViteConfig,
6
6
  mergeConfig as mergeViteConfig,
7
7
  build as viteBuild,
8
- createLogger
8
+ createLogger,
9
+ normalizePath
9
10
  } from "vite";
10
11
  import { parse as parseHtml } from "node-html-parser";
11
12
  import { resolveConfig } from "../config/index.js";
@@ -43,11 +44,13 @@ async function build(inlineConfig = {}) {
43
44
  const { assets, search, delivery } = config.main;
44
45
  const { partial } = assets;
45
46
  const resolvedOut = path.join(resolvedRoot, config.main.out);
46
- const bundleCssName = path.join(
47
- assets.outDir,
48
- assets.outName.replace(/\[name\]/, assets.bundle.outName) + ".css"
47
+ const bundleCssName = normalizePath(
48
+ path.join(
49
+ assets.outDir,
50
+ assets.outName.replace(/\[name\]/, assets.bundle.outName) + ".css"
51
+ )
49
52
  );
50
- const bugBundleCssName = path.join(assets.outDir, "bundle.css");
53
+ const bugBundleCssName = normalizePath(path.join(assets.outDir, "bundle.css"));
51
54
  const hydrateJsName = path.join(
52
55
  assets.outDir,
53
56
  assets.outName.replace(/\[name\]/, assets.partial.outName) + ".js"
@@ -210,8 +213,10 @@ async function build(inlineConfig = {}) {
210
213
  cssNameBugFix = Object.fromEntries(
211
214
  Object.entries(assetEntries).map((item) => {
212
215
  return [
213
- path.join(assets.outDir, path.parse(item[1]).name + ".css"),
214
- path.join(assets.outDir, item[0] + ".css")
216
+ normalizePath(
217
+ path.join(assets.outDir, path.parse(item[1]).name + ".css")
218
+ ),
219
+ normalizePath(path.join(assets.outDir, item[0] + ".css"))
215
220
  ];
216
221
  })
217
222
  );
@@ -1,5 +1,6 @@
1
1
  import path from "node:path";
2
2
  import fs from "fs-extra";
3
+ import { normalizePath } from "vite";
3
4
  import { flags } from "../config/system.js";
4
5
  import { getElements, cleanElement } from "../utility/element.js";
5
6
  import { getUniquePaths } from "../utility/path.js";
@@ -59,7 +60,9 @@ async function transformEntries({
59
60
  const name = item.name ? item.name : path.parse(src).name;
60
61
  const outDir = assets.outDir;
61
62
  const outName = assets.outName.replace(/\[name\]/, name);
62
- const assetPath = path.join(resolvedBase, outDir, `${outName}.${outExt}`);
63
+ const assetPath = normalizePath(
64
+ path.join(resolvedBase, outDir, `${outName}.${outExt}`)
65
+ );
63
66
  isScript ? scriptEntries[name] = src : linkEntries[name] = src;
64
67
  if (isScript && item.type) {
65
68
  item.type === "false" ? el.removeAttribute("type") : el.setAttribute("type", item.type);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minista",
3
3
  "description": "Static site generator with 100% static export from React and Vite",
4
- "version": "3.1.9",
4
+ "version": "3.1.11",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=14.15.0"