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 ast = isString(template) ? baseParse(template, options) : template
|
||||||
const [nodeTransforms, directiveTransforms] =
|
const [nodeTransforms, directiveTransforms] =
|
||||||
getBaseTransformPreset(prefixIdentifiers)
|
getBaseTransformPreset(prefixIdentifiers)
|
||||||
|
|
||||||
|
if (!__BROWSER__ && options.isTS) {
|
||||||
|
const { expressionPlugins } = options
|
||||||
|
if (!expressionPlugins || !expressionPlugins.includes('typescript')) {
|
||||||
|
options.expressionPlugins = [...(expressionPlugins || []), 'typescript']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
transform(
|
transform(
|
||||||
ast,
|
ast,
|
||||||
extend({}, options, {
|
extend({}, options, {
|
||||||
|
Loading…
Reference in New Issue
Block a user