chore: add hmr compiler flag (#11112)

* chore: add hmr compiler flag

* lint
pull/11111/head
Dominic Gannaway 6 months ago committed by GitHub
parent 3bb231197e
commit e1b2d29eda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -178,6 +178,12 @@ export interface CompileOptions extends ModuleCompileOptions {
* @default null
*/
cssOutputFilename?: string;
/**
* If `true`, compiles components with hot reloading support.
*
* @default false
*/
hmr?: boolean;
}
export interface ModuleCompileOptions {
@ -225,6 +231,7 @@ export type ValidatedCompileOptions = ValidatedModuleCompileOptions &
legacy: Required<Required<CompileOptions>['legacy']>;
runes: CompileOptions['runes'];
customElementOptions: SvelteOptions['customElement'];
hmr: CompileOptions['hmr'];
};
export type DeclarationKind =

@ -95,6 +95,8 @@ export const validate_component_options =
runes: boolean(undefined),
hmr: boolean(false),
sourcemap: validator(undefined, (input) => {
// Source maps can take on a variety of values, including string, JSON, map objects from magic-string and source-map,
// so there's no good way to check type validity here

@ -670,6 +670,12 @@ declare module 'svelte/compiler' {
* @default null
*/
cssOutputFilename?: string;
/**
* If `true`, compiles components with hot reloading support.
*
* @default false
*/
hmr?: boolean;
}
interface ModuleCompileOptions {
@ -2449,6 +2455,12 @@ declare module 'svelte/types/compiler/interfaces' {
* @default null
*/
cssOutputFilename?: string;
/**
* If `true`, compiles components with hot reloading support.
*
* @default false
*/
hmr?: boolean;
}
interface ModuleCompileOptions {

Loading…
Cancel
Save