Skip to content

Commit

Permalink
Merge pull request #11 from jorroll/patch-1
Browse files Browse the repository at this point in the history
fix: export this plugin's options interface
  • Loading branch information
amoutonbrady authored May 8, 2021
2 parents 16606a6 + 6f0cea9 commit 25f0cea
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,36 @@ const runtimePublicPath = '/@solid-refresh';
const runtimeFilePath = require.resolve('solid-refresh/dist/solid-refresh.mjs');
const runtimeCode = readFileSync(runtimeFilePath, 'utf-8');

interface Options {
/** Configuration options for vite-plugin-solid. */
export interface Options {
/**
* This will inject solid-js/dev in place of solid-js in dev mode. Has no
* effect in prod. If set to `false`, it won't inject it in dev. This is
* useful for extra logs and debugging.
*
* @default true
*/
dev: boolean;
/**
* This will force SSR code in the produced files. This is experiemental
* and mostly not working yet.
*
* @default false
*/
ssr: boolean;
/**
* This will inject HMR runtime in dev mode. Has no effect in prod. If
* set to `false`, it won't inject the runtime in dev.
*
* @default true
*/
hot: boolean;
/**
* Pass any additional babel transform options. They will be merged with
* the transformations required by Solid.
*
* @default {}
*/
babel:
| TransformOptions
| ((source: string, id: string, ssr: boolean) => TransformOptions)
Expand Down

0 comments on commit 25f0cea

Please sign in to comment.