fix(ref-transform): should transform $ref when used with generic arguments (#4446)
fix #4442
This commit is contained in:
@@ -25,7 +25,7 @@ import { babelParserDefaultPlugins } from '@vue/shared'
|
||||
const TO_VAR_SYMBOL = '$'
|
||||
const TO_REF_SYMBOL = '$$'
|
||||
const shorthands = ['ref', 'computed', 'shallowRef']
|
||||
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\(/
|
||||
const transformCheckRE = /[^\w]\$(?:\$|ref|computed|shallowRef)?\s*(\(|\<)/
|
||||
|
||||
export function shouldTransform(src: string): boolean {
|
||||
return transformCheckRE.test(src)
|
||||
|
||||
Reference in New Issue
Block a user