Skip to content

Commit 4a53965

Browse files
authored
fix: check for vue compiler in directive transform hook (#421)
1 parent 9b34b54 commit 4a53965

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

packages/unplugin-vue-i18n/src/core/directive.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ export function directivePlugin({
8383
if (vuePluginOptions == null) {
8484
vuePluginOptions = getVuePluginOptions(vuePlugin!)
8585
}
86-
analyzeIdentifiers(
87-
getDescriptor(filename, code, vuePluginOptions),
88-
vuePluginOptions,
89-
translationIdentifiers
90-
)
86+
if (vuePluginOptions?.compiler) {
87+
analyzeIdentifiers(
88+
getDescriptor(filename, code, vuePluginOptions),
89+
vuePluginOptions,
90+
translationIdentifiers
91+
)
92+
}
9193
}
9294
}
9395

0 commit comments

Comments
 (0)