Skip to content

Commit b769c7c

Browse files
authored
Fix conditional import of prettier-plugin-svelte (#332)
1 parent eece72c commit b769c7c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,14 @@ module.exports = {
8585
...htmlParsers.vue,
8686
preprocess: vuePreprocessor,
8787
},
88-
svelte: {
89-
...svelteParsers.parsers.svelte,
90-
preprocess: sveltePreprocessor,
91-
},
88+
...(!!svelteParsers.parsers
89+
? {
90+
svelte: {
91+
...svelteParsers.parsers.svelte,
92+
preprocess: sveltePreprocessor,
93+
},
94+
}
95+
: {}),
9296
},
9397
options,
9498
};

0 commit comments

Comments
 (0)