Skip to content

Commit 6f0cea9

Browse files
authored
docs: add jsdoc comments for Options interface
1 parent 6d5a31a commit 6f0cea9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/index.ts

+26
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,36 @@ const runtimePublicPath = '/@solid-refresh';
1313
const runtimeFilePath = require.resolve('solid-refresh/dist/solid-refresh.mjs');
1414
const runtimeCode = readFileSync(runtimeFilePath, 'utf-8');
1515

16+
/** Configuration options for vite-plugin-solid. */
1617
export interface Options {
18+
/**
19+
* This will inject solid-js/dev in place of solid-js in dev mode. Has no
20+
* effect in prod. If set to `false`, it won't inject it in dev. This is
21+
* useful for extra logs and debugging.
22+
*
23+
* @default true
24+
*/
1725
dev: boolean;
26+
/**
27+
* This will force SSR code in the produced files. This is experiemental
28+
* and mostly not working yet.
29+
*
30+
* @default false
31+
*/
1832
ssr: boolean;
33+
/**
34+
* This will inject HMR runtime in dev mode. Has no effect in prod. If
35+
* set to `false`, it won't inject the runtime in dev.
36+
*
37+
* @default true
38+
*/
1939
hot: boolean;
40+
/**
41+
* Pass any additional babel transform options. They will be merged with
42+
* the transformations required by Solid.
43+
*
44+
* @default {}
45+
*/
2046
babel:
2147
| TransformOptions
2248
| ((source: string, id: string, ssr: boolean) => TransformOptions)

0 commit comments

Comments
 (0)