Skip to content

Commit

Permalink
[Rollup] Set the runtime to automatic and mark the jsx-runtime as ext…
Browse files Browse the repository at this point in the history
…ernal
  • Loading branch information
bjornstar committed Nov 30, 2021
1 parent ce3d656 commit a9dd479
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==

"@react-three/cannon@file:..":
version "4.0.1"
version "4.1.0"
dependencies:
cannon-es "^0.18.0"
cannon-es-debugger "^0.1.4"
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import babel from '@rollup/plugin-babel'
import resolve from '@rollup/plugin-node-resolve'
import worker from 'rollup-plugin-web-worker-loader'

const external = ['react', '@react-three/fiber', 'three']
const external = ['react', 'react/jsx-runtime', '@react-three/fiber', 'three']
const extensions = ['.js', '.jsx', '.ts', '.tsx', '.json']

const getBabelOptions = ({ useESModules }, targets) => ({
Expand All @@ -12,7 +12,7 @@ const getBabelOptions = ({ useESModules }, targets) => ({
babelHelpers: 'runtime',
presets: [
['@babel/preset-env', { loose: true, modules: false, targets }],
'@babel/preset-react',
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-typescript',
],
plugins: [['@babel/transform-runtime', { regenerator: false, useESModules }]],
Expand Down

1 comment on commit a9dd479

@vercel
Copy link

@vercel vercel bot commented on a9dd479 Nov 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.