Skip to content

Commit

Permalink
fix(cli): correct noop return value on esbuild-register in dev (#6990)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Jun 19, 2024
1 parent df89f88 commit 51ecce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sanity/src/_internal/cli/server/renderDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ function renderDocumentFromWorkerData() {
// Same as above, but we don't want to enforce a .jsx extension for anything with JSX
debug('Registering esbuild for .js files using jsx loader')
const {unregister: unregisterJs} = __DEV__
? () => ({unregister: () => undefined})
? {unregister: () => undefined}
: require('esbuild-register/dist/node').register({
target: `node${process.version.slice(1)}`,
extensions: ['.js'],
Expand Down

0 comments on commit 51ecce0

Please sign in to comment.