Skip to content

Commit

Permalink
fix: check for vue compiler in directive transform hook
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Nov 16, 2024
1 parent 0ba36cc commit d41b225
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/unplugin-vue-i18n/src/core/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ export function directivePlugin({
if (vuePluginOptions == null) {
vuePluginOptions = getVuePluginOptions(vuePlugin!)
}
analyzeIdentifiers(
getDescriptor(filename, code, vuePluginOptions),
vuePluginOptions,
translationIdentifiers
)
if (vuePluginOptions?.compiler) {
analyzeIdentifiers(
getDescriptor(filename, code, vuePluginOptions),
vuePluginOptions,
translationIdentifiers
)
}
}
}

Expand Down

0 comments on commit d41b225

Please sign in to comment.