fix(compiler-core): support ts syntax in expressions when isTS is true
This commit is contained in:
parent
e9c0694451
commit
0dc521b9e1
@ -85,6 +85,14 @@ export function baseCompile(
|
||||
const ast = isString(template) ? baseParse(template, options) : template
|
||||
const [nodeTransforms, directiveTransforms] =
|
||||
getBaseTransformPreset(prefixIdentifiers)
|
||||
|
||||
if (!__BROWSER__ && options.isTS) {
|
||||
const { expressionPlugins } = options
|
||||
if (!expressionPlugins || !expressionPlugins.includes('typescript')) {
|
||||
options.expressionPlugins = [...(expressionPlugins || []), 'typescript']
|
||||
}
|
||||
}
|
||||
|
||||
transform(
|
||||
ast,
|
||||
extend({}, options, {
|
||||
|
Loading…
Reference in New Issue
Block a user