@pracht/vite-plugin 0.2.3 → 0.3.0

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/README.md CHANGED
@@ -29,7 +29,7 @@ export default defineConfig({
29
29
 
30
30
  ## Peer Dependencies
31
31
 
32
- - `vite@^7.0.0 || ^8.0.0`
32
+ - `vite@^8.0.0`
33
33
 
34
34
  Target-specific Vite plugins (e.g. `@cloudflare/vite-plugin`) are pulled in by
35
35
  the adapter package you install (`@pracht/adapter-cloudflare`,
package/dist/index.d.mts CHANGED
@@ -1,8 +1,11 @@
1
1
  import { Plugin } from "vite";
2
+ import { RenderMode, RenderMode as RenderMode$1 } from "@pracht/core";
2
3
 
3
- //#region src/index.d.ts
4
+ //#region src/plugin-assets.d.ts
4
5
  declare const PRACHT_CLIENT_MODULE_ID = "virtual:pracht/client";
5
6
  declare const PRACHT_SERVER_MODULE_ID = "virtual:pracht/server";
7
+ //#endregion
8
+ //#region src/plugin-adapter.d.ts
6
9
  /**
7
10
  * An adapter object that bridges pracht's platform-agnostic core to a specific
8
11
  * deployment target. Built-in adapters are provided by `@pracht/adapter-node`,
@@ -35,8 +38,16 @@ interface PrachtAdapter {
35
38
  * (e.g. Cloudflare workerd via `@cloudflare/vite-plugin`).
36
39
  */
37
40
  ownsDevServer?: boolean;
41
+ /**
42
+ * If true, the adapter targets an edge runtime that cannot resolve
43
+ * dependencies from `node_modules` at runtime. The Vite plugin will set
44
+ * `ssr.noExternal = true` for SSR builds so all dependencies are bundled
45
+ * into the server output.
46
+ */
47
+ edge?: boolean;
38
48
  }
39
- type RenderMode = "spa" | "ssr" | "ssg" | "isg";
49
+ //#endregion
50
+ //#region src/plugin-options.d.ts
40
51
  interface PrachtPluginOptions {
41
52
  appFile?: string;
42
53
  routesDir?: string;
@@ -48,9 +59,10 @@ interface PrachtPluginOptions {
48
59
  /** Enable file-system pages routing by pointing to the pages directory (e.g. "/src/pages"). */
49
60
  pagesDir?: string;
50
61
  /** Default render mode for pages when RENDER_MODE is not exported. Defaults to "ssr". */
51
- pagesDefaultRender?: RenderMode;
62
+ pagesDefaultRender?: RenderMode$1;
52
63
  }
53
- declare function pracht(options?: PrachtPluginOptions): Promise<Plugin[]>;
64
+ //#endregion
65
+ //#region src/plugin-codegen.d.ts
54
66
  declare function createPrachtClientModuleSource(options?: PrachtPluginOptions, buildOptions?: {
55
67
  root?: string;
56
68
  }): string;
@@ -60,4 +72,7 @@ declare function createPrachtServerModuleSource(options?: PrachtPluginOptions, b
60
72
  }): string;
61
73
  declare function createPrachtRegistryModuleSource(options?: PrachtPluginOptions): string;
62
74
  //#endregion
63
- export { PRACHT_CLIENT_MODULE_ID, PRACHT_SERVER_MODULE_ID, PrachtAdapter, PrachtPluginOptions, RenderMode, createPrachtClientModuleSource, createPrachtRegistryModuleSource, createPrachtServerModuleSource, pracht };
75
+ //#region src/index.d.ts
76
+ declare function pracht(options?: PrachtPluginOptions): Promise<Plugin[]>;
77
+ //#endregion
78
+ export { PRACHT_CLIENT_MODULE_ID, PRACHT_SERVER_MODULE_ID, type PrachtAdapter, type PrachtPluginOptions, type RenderMode, createPrachtClientModuleSource, createPrachtRegistryModuleSource, createPrachtServerModuleSource, pracht };