Home / Type/ ModuleCompileOptions Type — svelte Architecture

ModuleCompileOptions Type — svelte Architecture

Architecture documentation for the ModuleCompileOptions type/interface in index.d.ts from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  bd5a58ba_9e05_166c_e2c3_0b5e48ade742["ModuleCompileOptions"]
  d1a9b9b5_cc04_9500_c39a_435c606b0766["index.d.ts"]
  bd5a58ba_9e05_166c_e2c3_0b5e48ade742 -->|defined in| d1a9b9b5_cc04_9500_c39a_435c606b0766
  style bd5a58ba_9e05_166c_e2c3_0b5e48ade742 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/types/index.d.ts lines 198–238

export interface ModuleCompileOptions {
	/**
	 * If `true`, causes extra code to be added that will perform runtime checks and provide debugging information during development.
	 *
	 * @default false
	 */
	dev?: boolean;
	/**
	 * If `"client"`, Svelte emits code designed to run in the browser.
	 * If `"server"`, Svelte emits code suitable for server-side rendering.
	 * If `false`, nothing is generated. Useful for tooling that is only interested in warnings.
	 *
	 * @default 'client'
	 */
	generate?: 'client' | 'server' | false;
	/**
	 * Used for debugging hints and sourcemaps. Your bundler plugin will set it automatically.
	 */
	filename?: string;
	/**
	 * Used for ensuring filenames don't leak filesystem information. Your bundler plugin will set it automatically.
	 * @default process.cwd() on node-like environments, undefined elsewhere
	 */
	rootDir?: string;
	/**
	 * A function that gets a `Warning` as an argument and returns a boolean.
	 * Use this to filter out warnings. Return `true` to keep the warning, `false` to discard it.
	 */
	warningFilter?: (warning: Warning) => boolean;
	/**
	 * Experimental options
	 * @since 5.36
	 */
	experimental?: {
		/**
		 * Allow `await` keyword in deriveds, template expressions, and the top level of components
		 * @since 5.36
		 */
		async?: boolean;
	};
}

Frequently Asked Questions

What is the ModuleCompileOptions type?
ModuleCompileOptions is a type/interface in the svelte codebase, defined in packages/svelte/src/compiler/types/index.d.ts.
Where is ModuleCompileOptions defined?
ModuleCompileOptions is defined in packages/svelte/src/compiler/types/index.d.ts at line 198.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free