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'
14
14
import { getOrCreateModel } from ' ./utils'
15
15
import { Store } from ' ../store'
16
16
import 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'
20
20
import prettier from ' prettier/standalone'
21
21
import { registerHighlighter } from ' ./highlight'
22
22
@@ -145,7 +145,7 @@ onMounted(() => {
145
145
emit (' change' , editorInstance .getValue ())
146
146
})
147
147
148
- editorInstance .onDidBlurEditorWidget (() => {
148
+ editorInstance .onDidBlurEditorWidget (async () => {
149
149
const parser = {
150
150
vue: ' html' ,
151
151
html: ' html' ,
@@ -165,7 +165,7 @@ onMounted(() => {
165
165
166
166
let code = editorInstance .getValue ()
167
167
try {
168
- code = prettier .format (code , options )
168
+ code = await prettier .format (code , options )
169
169
} catch (err ) {}
170
170
171
171
if (code !== props .value ) {
You can’t perform that action at this time.
0 commit comments