minista 2.4.0 → 2.4.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.
Files changed (2) hide show
  1. package/dist/generate.js +6 -0
  2. package/package.json +1 -1
package/dist/generate.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import fs from "fs-extra";
2
3
  import path from "path";
3
4
  import url from "url";
4
5
  import { systemConfig } from "./system.js";
@@ -71,6 +72,11 @@ async function generateTempAssets(config, viteConfig) {
71
72
  }
72
73
  async function generatePartialHydration(config, mdxConfig, viteConfig) {
73
74
  const moduleDir = systemConfig.temp.partialHydration.outDir + "/modules";
75
+ const moduleDirRelative = path.relative(".", moduleDir);
76
+ const moduleDirExists = fs.existsSync(moduleDirRelative);
77
+ if (!moduleDirExists) {
78
+ return;
79
+ }
74
80
  const moduleFilePaths = await getFilePaths(moduleDir, "txt");
75
81
  if (moduleFilePaths.length === 0) {
76
82
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minista",
3
3
  "description": "Next.js Like Development with 100% Static Generate",
4
- "version": "2.4.0",
4
+ "version": "2.4.1",
5
5
  "bin": {
6
6
  "minista": "./bin/minista.js"
7
7
  },