Skip to content

Commit

Permalink
Allow React automatic runtime to be enforced with an option
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Nov 5, 2020
1 parent 118ab79 commit a431804
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/next/build/babel/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ module.exports = (
const supportsESM = api.caller(supportsStaticESM)
const isServer = api.caller((caller: any) => !!caller && caller.isServer)
const isModern = api.caller((caller: any) => !!caller && caller.isModern)
const hasJsxRuntime = Boolean(
api.caller((caller: any) => !!caller && caller.hasJsxRuntime)
)
const hasJsxRuntime =
options['preset-react']?.runtime === 'automatic' ||
Boolean(api.caller((caller: any) => !!caller && caller.hasJsxRuntime))

const isLaxModern =
isModern ||
Expand Down

0 comments on commit a431804

Please sign in to comment.