feat(compiler-core/internal): add onContextCreated
option to generate
(#1672)
This commit is contained in:
parent
4951d43526
commit
615dccd00e
@ -180,9 +180,12 @@ function createCodegenContext(
|
||||
|
||||
export function generate(
|
||||
ast: RootNode,
|
||||
options: CodegenOptions = {}
|
||||
options: CodegenOptions & {
|
||||
onContextCreated?: (context: CodegenContext) => void
|
||||
} = {}
|
||||
): CodegenResult {
|
||||
const context = createCodegenContext(ast, options)
|
||||
if (options.onContextCreated) options.onContextCreated(context)
|
||||
const {
|
||||
mode,
|
||||
push,
|
||||
|
Loading…
Reference in New Issue
Block a user