@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 +1 -1
- package/dist/index.d.mts +20 -5
- package/dist/index.mjs +1123 -171
- package/dist/pages-router.mjs +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
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/
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|