File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ const plugin: VueLanguagePlugin = (ctx) => {
41
41
} else {
42
42
vueFile . update ( snapshot ) ;
43
43
}
44
- files . push ( ...vueFile . embeddedFiles . map ( ( file ) => file . fileName ) ) ;
44
+ // add .nsfc to prevent other plugins from resolving these files
45
+ files . push (
46
+ ...vueFile . embeddedFiles . map ( ( file ) => `${ file . fileName } .nsfc` )
47
+ ) ;
45
48
}
46
49
return files ;
47
50
} ,
@@ -58,8 +61,13 @@ const plugin: VueLanguagePlugin = (ctx) => {
58
61
return ;
59
62
}
60
63
64
+ const embeddedFileOriginalName = embeddedFile . fileName . replace (
65
+ / \. n s f c $ / ,
66
+ ""
67
+ ) ;
68
+
61
69
const targetFile = vueFile . _allEmbeddedFiles . value . find (
62
- ( file ) => file . file . fileName === embeddedFile . fileName
70
+ ( file ) => file . file . fileName === embeddedFileOriginalName
63
71
) ;
64
72
const componentBlock = sfc . customBlocks . find (
65
73
( b ) =>
You can’t perform that action at this time.
0 commit comments