@solidjs/vite-plugin 3.0.0-next.32 → 3.0.0-next.34
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 +22 -9
- package/dist/cjs/index.cjs +265 -40
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.mjs +265 -40
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/src/diagnostics/index.d.ts +5 -0
- package/dist/types/src/index.d.ts +17 -5
- package/dist/types/src/server-functions/compile.d.ts +1 -1
- package/dist/types/src/ssr/index.d.ts +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
export declare const DIAGNOSTICS_PACKAGE = "@solidjs/diagnostics";
|
|
3
|
+
export declare const DIAGNOSTICS_CLIENT_ID = "virtual:solid-diagnostics/client";
|
|
4
|
+
export declare function diagnosticsClientModuleCode(): string;
|
|
5
|
+
export declare function solidDiagnostics(): Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as babel from '@babel/core';
|
|
2
|
-
import type { TransformOptions as JsxCompilerOptions } from '@
|
|
2
|
+
import type { TransformOptions as JsxCompilerOptions } from '@solidjs/compiler';
|
|
3
3
|
import { serverFunctions, type ServerFunctionsOptions } from './server-functions/index.js';
|
|
4
4
|
import { type StartOptions } from './ssr/index.js';
|
|
5
5
|
export { devStylePatch } from './dev-manifest.js';
|
|
@@ -36,6 +36,18 @@ export interface Options {
|
|
|
36
36
|
* @default true
|
|
37
37
|
*/
|
|
38
38
|
dev?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Dev-serve only: expose Solid's diagnostic and attribution channels to
|
|
41
|
+
* out-of-process consumers (agents, tests, curl). Injects a client module
|
|
42
|
+
* that installs the in-page bridge from the app's own
|
|
43
|
+
* `@solidjs/diagnostics` (which must be installed as a dev dependency),
|
|
44
|
+
* and serves a `/__solid/diagnostics` endpoint on the dev server that
|
|
45
|
+
* forwards capture control (`begin`/`end`), `whyDidRun`, and cost queries
|
|
46
|
+
* to the page over the Vite WebSocket. No effect on builds or preview.
|
|
47
|
+
*
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
diagnostics?: boolean;
|
|
39
51
|
/**
|
|
40
52
|
* Whether the app is server-rendered — one meaning everywhere.
|
|
41
53
|
*
|
|
@@ -108,8 +120,8 @@ export interface Options {
|
|
|
108
120
|
start?: boolean | StartOptions;
|
|
109
121
|
/**
|
|
110
122
|
* JSX compiler backend to use. The default `"native"` compiles through
|
|
111
|
-
* `@
|
|
112
|
-
*
|
|
123
|
+
* `@solidjs/compiler`; `"babel"` is the escape hatch running
|
|
124
|
+
* `@solidjs/babel-plugin` instead — if native output ever differs from your
|
|
113
125
|
* expectations, set `compiler: "babel"` and file an issue (the behavioral
|
|
114
126
|
* diff between the modes is the bug report). Platforms without a prebuilt
|
|
115
127
|
* native binary (e.g. StackBlitz WebContainers) automatically use the wasm
|
|
@@ -146,8 +158,8 @@ export interface Options {
|
|
|
146
158
|
*/
|
|
147
159
|
babel?: babel.TransformOptions | ((source: string, id: string, ssr: boolean) => babel.TransformOptions) | ((source: string, id: string, ssr: boolean) => Promise<babel.TransformOptions>);
|
|
148
160
|
/**
|
|
149
|
-
* Pass any additional [babel-plugin
|
|
150
|
-
* They will be merged with the
|
|
161
|
+
* Pass any additional [@solidjs/babel-plugin](https://github.com/solidjs/solid/tree/main/packages/babel-plugin) options.
|
|
162
|
+
* They will be merged with the plugin's Solid defaults.
|
|
151
163
|
*
|
|
152
164
|
* @default {}
|
|
153
165
|
*/
|
|
@@ -24,7 +24,7 @@ export interface CompileResult {
|
|
|
24
24
|
valid: boolean;
|
|
25
25
|
code: string;
|
|
26
26
|
map: string | null;
|
|
27
|
-
functions: import('@
|
|
27
|
+
functions: import('@solidjs/compiler').ServerFunctionMeta[];
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Runs the directive transform over one module. Function IDs are
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidjs/vite-plugin",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.34",
|
|
4
4
|
"description": "solid-js integration plugin for Vite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@ampproject/remapping": "^2.3.0",
|
|
55
55
|
"@babel/core": "^7.23.3",
|
|
56
|
-
"@
|
|
56
|
+
"@solidjs/babel-plugin": "^2.0.0-rc.3",
|
|
57
|
+
"@solidjs/compiler": "^2.0.0-rc.3",
|
|
57
58
|
"@types/babel__core": "^7.20.4",
|
|
58
|
-
"babel-preset-solid": "^2.0.0-rc.0",
|
|
59
59
|
"merge-anything": "^5.1.7",
|
|
60
60
|
"vitefu": "^1.0.4"
|
|
61
61
|
},
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
68
68
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
69
69
|
"@skypack/package-check": "^0.2.2",
|
|
70
|
+
"@solidjs/diagnostics": "^2.0.0-rc.3",
|
|
70
71
|
"@solidjs/start-devtools": "^1.0.0-next.3",
|
|
71
72
|
"@types/node": "^24.0.0",
|
|
72
73
|
"cypress": "^14.0.0",
|