We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76827a2 commit 9a69ceeCopy full SHA for 9a69cee
src/plugins/rehype-static-to-dynamic.mjs
@@ -1,7 +1,9 @@
1
import * as t from '@babel/types';
2
import { readFileSync } from 'fs';
3
import { dirname, join } from 'path';
4
-import * as prettier from 'prettier';
+import * as prettier from 'prettier/standalone';
5
+import * as prettierBabel from 'prettier/plugins/babel';
6
+import * as prettierEstree from 'prettier/plugins/estree';
7
import * as recast from 'recast';
8
import * as babelParser from 'recast/parsers/babel-ts.js';
9
import { visit } from 'unist-util-visit';
@@ -392,6 +394,7 @@ async function convertStaticToDynamic(code) {
392
394
...prettierConfig,
393
395
parser: 'babel',
396
singleQuote: true,
397
+ plugins: [prettierBabel, prettierEstree],
398
});
399
400
// Remove trailing newline that prettier adds
0 commit comments