function baseCompile(template, options = {}) {
    /* istanbul ignore if */
    if (__BROWSER__) {
        const onError = options.onError || defaultOnError;
        if (options.prefixIdentifiers === true) {
            onError(createCompilerError(51 /* X_PREFIX_ID_NOT_SUPPORTED */));
        }
        else if (options.mode === 'module') {
            onError(createCompilerError(52 /* X_MODULE_MODE_NOT_SUPPORTED */));
        }
    }
    const ast = isString(template) ? parse(template, options) : template;
    const prefixIdentifiers = !__BROWSER__ &&
        (options.prefixIdentifiers === true || options.mode === 'module');
    transform(ast, {
        ...options,
        prefixIdentifiers,
        nodeTransforms: [
            transformOnce,
            transformIf,
            transformFor,
            ...(prefixIdentifiers
                ? [
                    // order is important
                    trackVForSlotScopes,
                    transformExpression
                ]
                : []),
            transformSlotOutlet,
            transformElement,
            trackSlotScopes,
            transformText,
            ...(options.nodeTransforms || []) // user transforms
        ],
        directiveTransforms: {
            on: transformOn,
            bind: transformBind,
            model: transformModel,
            ...(options.directiveTransforms || {}) // user transforms
        }
    });
    return generate(ast, {
        ...options,
        prefixIdentifiers
    });
}
// can export `compile` while re-exporting everything else.
can export `compile` while re-exporting everything else.
can export ` compile ` while re - exporting everything else .
function baseCompile(template, options = {}) {
    if (__BROWSER__) {
        const onError = options.onError || defaultOnError;
        if (options.prefixIdentifiers === true) {
            onError(createCompilerError(51 ));
        }
        else if (options.mode === 'module') {
            onError(createCompilerError(52 ));
        }
    }
    const ast = isString(template) ? parse(template, options) : template;
    const prefixIdentifiers = !__BROWSER__ &&
        (options.prefixIdentifiers === true || options.mode === 'module');
    transform(ast, {
        ...options,
        prefixIdentifiers,
        nodeTransforms: [
            transformOnce,
            transformIf,
            transformFor,
            ...(prefixIdentifiers
                ? [
                    trackVForSlotScopes,
                    transformExpression
                ]
                : []),
            transformSlotOutlet,
            transformElement,
            trackSlotScopes,
            transformText,
            ...(options.nodeTransforms || []) 
        ],
        directiveTransforms: {
            on: transformOn,
            bind: transformBind,
            model: transformModel,
            ...(options.directiveTransforms || {}) 
        }
    });
    return generate(ast, {
        ...options,
        prefixIdentifiers
    });
}
function baseCompile ( template , options = { } ) { if ( __BROWSER__ ) { const onError = options . onError || defaultOnError ; if ( options . prefixIdentifiers === true ) { onError ( createCompilerError ( 51 ) ) ; } else if ( options . mode === 'module' ) { onError ( createCompilerError ( 52 ) ) ; } } const ast = isString ( template ) ? parse ( template , options ) : template ; const prefixIdentifiers = ! __BROWSER__ && ( options . prefixIdentifiers === true || options . mode === 'module' ) ; transform ( ast , { ... options , prefixIdentifiers , nodeTransforms : [ transformOnce , transformIf , transformFor , ... ( prefixIdentifiers ? [ trackVForSlotScopes , transformExpression ] : [ ] ) , transformSlotOutlet , transformElement , trackSlotScopes , transformText , ... ( options . nodeTransforms || [ ] ) ] , directiveTransforms : { on : transformOn , bind : transformBind , model : transformModel , ... ( options . directiveTransforms || { } ) } } ) ; return generate ( ast , { ... options , prefixIdentifiers } ) ; }
can export `compile` while re-exporting everything else.
can export ` compile ` while re - exporting everything else .
/* istanbul ignore if */ /* X_PREFIX_ID_NOT_SUPPORTED */ /* X_MODULE_MODE_NOT_SUPPORTED */ // order is important // user transforms // user transforms