Skip to content

Commit c90bdcd

Browse files
committed
fix(language-service): read vueCompilerOptions from generated root
1 parent 86a1c83 commit c90bdcd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/language-service/lib/plugins/vue-document-drop.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ export function create(
2424
documentDropEditsProvider: true,
2525
},
2626
create(context) {
27-
let casing = TagNameCasing.Pascal as TagNameCasing; // TODO
28-
2927
const tsPluginClient = getTsPluginClient?.(context);
30-
const vueCompilerOptions = context.project.vue!.compilerOptions;
28+
let casing = TagNameCasing.Pascal as TagNameCasing; // TODO
3129

3230
return {
3331
async provideDocumentDropEdits(document, _position, dataTransfer) {
@@ -53,7 +51,7 @@ export function create(
5351
importUri = item.value as string;
5452
}
5553
}
56-
if (!importUri || !vueCompilerOptions.extensions.some(ext => importUri.endsWith(ext))) {
54+
if (!importUri || !root.vueCompilerOptions.extensions.some(ext => importUri.endsWith(ext))) {
5755
return;
5856
}
5957

0 commit comments

Comments
 (0)