Skip to content

Commit

Permalink
feat(sfc): change <script setup> directive resolution to require v …
Browse files Browse the repository at this point in the history
…prefix

close #3543
  • Loading branch information
yyx990803 committed Jun 28, 2021
1 parent 0245c98 commit d35e0b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/compiler-core/src/transforms/transformElement.ts
Expand Up @@ -739,7 +739,8 @@ function buildDirectiveArgs(
} else {
// user directive.
// see if we have directives exposed via <script setup>
const fromSetup = !__BROWSER__ && resolveSetupReference(dir.name, context)
const fromSetup =
!__BROWSER__ && resolveSetupReference('v-' + dir.name, context)
if (fromSetup) {
dirArgs.push(fromSetup)
} else {
Expand Down

0 comments on commit d35e0b1

Please sign in to comment.