From 7bd06ecfd95c63d7d468c6a8e249f289dc9faa41 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Tue, 24 Sep 2024 12:40:22 +0200 Subject: [PATCH] docs(prettier): format in worker like on ssr --- docs/app/workers/prettier.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/app/workers/prettier.js b/docs/app/workers/prettier.js index 719e38cd..d44d7b53 100644 --- a/docs/app/workers/prettier.js +++ b/docs/app/workers/prettier.js @@ -1,7 +1,10 @@ /* eslint-disable no-undef */ import('https://unpkg.com/prettier@3.3.3/standalone.js') +import('https://unpkg.com/prettier@3.3.3/plugins/babel.js') +import('https://unpkg.com/prettier@3.3.3/plugins/estree.js') import('https://unpkg.com/prettier@3.3.3/plugins/html.js') import('https://unpkg.com/prettier@3.3.3/plugins/markdown.js') +import('https://unpkg.com/prettier@3.3.3/plugins/typescript.js') self.onmessage = async function (event) { self.postMessage({ @@ -19,6 +22,7 @@ function handleMessage(message) { async function handleFormatMessage(message) { const { options, source } = message + const formatted = await prettier.format(source, { parser: 'markdown', plugins: prettierPlugins,