Skip to content

Commit 977a284

Browse files
committed
supporting prettier/standalone for old versions of prettier in test app
1 parent 368c18f commit 977a284

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

test.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import path from 'node:path';
22
import createEsmUtils from 'esm-utils';
3+
import prettier from 'prettier';
4+
import { satisfies } from 'semver';
35

46
const { __dirname } = createEsmUtils(import.meta);
57

@@ -13,6 +15,14 @@ export default {
1315

1416
externals: { 'fs/promises': 'fs/promises' },
1517

18+
resolve: {
19+
alias: {
20+
prettier: satisfies(prettier.version, '^2.3.0')
21+
? 'prettier/standalone.js'
22+
: 'prettier/standalone'
23+
}
24+
},
25+
1626
experiments: {
1727
asyncWebAssembly: true,
1828
topLevelAwait: true,

0 commit comments

Comments
 (0)