Skip to content

Commit

Permalink
Simplify normalizing of Prettier
Browse files Browse the repository at this point in the history
We no longer need to add the `.js` extension, because Prettier maps this
in their package exports.
  • Loading branch information
remcohaszing committed Feb 10, 2025
1 parent 91a768d commit 642849b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ await build({
}))
// The main prettier entry point contains all of Prettier.
// The standalone bundle is smaller and works fine for us.
onResolve({ filter: /^prettier/ }, ({ path }) => ({
path: path === 'prettier' ? 'prettier/standalone.js' : `${path}.js`,
onResolve({ filter: /^prettier$/ }, () => ({
path: 'prettier/standalone',
external: true,
sideEffects: false
}))
Expand Down

0 comments on commit 642849b

Please sign in to comment.