File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ import { initMonaco } from './env'
1414import { getOrCreateModel } from ' ./utils'
1515import { Store } from ' ../store'
1616import type { PreviewMode } from ' ../editor/types'
17- import parserBabel from ' prettier/parser- babel'
18- import parserHtml from ' prettier/parser- html'
19- import parserPostcss from ' prettier/parser- postcss'
17+ import parserBabel from ' prettier/plugins/ babel'
18+ import parserHtml from ' prettier/plugins/ html'
19+ import parserPostcss from ' prettier/plugins/ postcss'
2020import prettier from ' prettier/standalone'
2121import { registerHighlighter } from ' ./highlight'
2222
@@ -145,7 +145,7 @@ onMounted(() => {
145145 emit (' change' , editorInstance .getValue ())
146146 })
147147
148- editorInstance .onDidBlurEditorWidget (() => {
148+ editorInstance .onDidBlurEditorWidget (async () => {
149149 const parser = {
150150 vue: ' html' ,
151151 html: ' html' ,
@@ -165,7 +165,7 @@ onMounted(() => {
165165
166166 let code = editorInstance .getValue ()
167167 try {
168- code = prettier .format (code , options )
168+ code = await prettier .format (code , options )
169169 } catch (err ) {}
170170
171171 if (code !== props .value ) {
You can’t perform that action at this time.
0 commit comments