Skip to content

Commit d7260e1

Browse files
adam-26mrmckeb
andauthored
fix: check if file exists before processing (#218)
Co-authored-by: Brody McKee <[email protected]>
1 parent d722951 commit d7260e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const init: tsModule.server.PluginModuleFactory = ({ typescript: ts }) => {
126126
};
127127

128128
languageServiceHost.getScriptSnapshot = (fileName) => {
129-
if (isCSS(fileName)) {
129+
if (isCSS(fileName) && fs.existsSync(fileName)) {
130130
return getDtsSnapshot(
131131
ts,
132132
processor,

0 commit comments

Comments
 (0)