CodegenOptions
interface CodegenOptions extends SharedTransformCodegenOptions {
mode?: "module" | "function";
optimizeImports?: boolean;
runtimeGlobalName?: string;
runtimeModuleName?: string;
scopeId?: string | null;
sourceMap?: boolean;
ssrRuntimeModuleName?: string;
}§Properties
§
mode?: "module" | "function"
[src]module
mode will generate ES module import statements for helpers and export the render function as the default export.function
mode will generate a singleconst { helpers... } = Vue
statement and return the render function. It expectsVue
to be globally available (or passed by wrapping the code with an IIFE). It is meant to be used withnew Function(code)()
to generate a render function at runtime.
§
optimizeImports?: boolean
[src]Option to optimize helper import bindings via variable assignment (only used for webpack code-split)