@kimesh/kit 0.2.41 → 0.2.42

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/index.mjs +7 -3
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { klona } from "klona/json";
5
5
  import destr from "destr";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
7
  import consola from "consola";
8
- import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from "node:fs";
8
+ import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, unlinkSync, writeFileSync } from "node:fs";
9
9
  import { dirname, isAbsolute, join, resolve } from "node:path";
10
10
  import fg from "fast-glob";
11
11
  import { basename, dirname as dirname$1, extname, isAbsolute as isAbsolute$1, join as join$1, normalize, relative, resolve as resolve$1 } from "pathe";
@@ -3468,7 +3468,7 @@ function kimeshPlugin(options = {}) {
3468
3468
  const nodeModules = resolve$1(workspaceRoot, "node_modules");
3469
3469
  if (command === "build") {
3470
3470
  if (!existsSync(resolvedDirs.buildDir)) mkdirSync(resolvedDirs.buildDir, { recursive: true });
3471
- writeFileSync(join$1(resolvedDirs.buildDir, "index.html"), generateHtml(config.name || "Kimesh App"), "utf-8");
3471
+ writeFileSync(join$1(configRoot, "index.html"), generateHtml(config.name || "Kimesh App"), "utf-8");
3472
3472
  const hasContext = existsSync(join$1(resolvedDirs.srcDir, "app.context.ts"));
3473
3473
  writeFileSync(join$1(resolvedDirs.buildDir, "entry.ts"), generateEntryCode({
3474
3474
  hasContext,
@@ -3519,7 +3519,7 @@ function kimeshPlugin(options = {}) {
3519
3519
  target: resolvedBuildConfig.target,
3520
3520
  sourcemap: resolvedBuildConfig.sourcemap,
3521
3521
  minify: resolvedBuildConfig.minify,
3522
- rollupOptions: command === "build" ? { input: join$1(resolvedDirs.buildDir, "index.html") } : void 0
3522
+ rollupOptions: command === "build" ? { input: join$1(configRoot, "index.html") } : void 0
3523
3523
  },
3524
3524
  optimizeDeps: { exclude: [
3525
3525
  "#kimesh/routes",
@@ -3615,6 +3615,10 @@ function kimeshPlugin(options = {}) {
3615
3615
  server.watcher.on("add", handleWatchEvent("add"));
3616
3616
  server.watcher.on("unlink", handleWatchEvent("unlink"));
3617
3617
  server.middlewares.use(createSpaFallbackMiddleware(server, state.generatedDir));
3618
+ },
3619
+ closeBundle() {
3620
+ const rootHtml = join$1(state.root, "index.html");
3621
+ if (existsSync(rootHtml)) unlinkSync(rootHtml);
3618
3622
  }
3619
3623
  };
3620
3624
  const routerPlugin = kimeshRouterGenerator({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimesh/kit",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Build-time engine for Kimesh framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,9 +27,9 @@
27
27
  "test:watch": "vitest"
28
28
  },
29
29
  "dependencies": {
30
- "@kimesh/auto-import": "0.2.41",
31
- "@kimesh/layers": "0.2.41",
32
- "@kimesh/router-generator": "0.2.41",
30
+ "@kimesh/auto-import": "0.2.42",
31
+ "@kimesh/layers": "0.2.42",
32
+ "@kimesh/router-generator": "0.2.42",
33
33
  "@vitejs/plugin-vue": "^6.0.4",
34
34
  "c12": "^3.3.3",
35
35
  "consola": "^3.4.2",