transpile
How to load OrbitControls in a Nextjs page
How do I import and use OrbitControls in my Nextjs app? I have tried import { OrbitControls } from "three/examples/jsm/controls/OrbitControls"; I get this error Unhandled Rejection (SyntaxError): Unexpected token { If I use import {OrbitControls} from 'react-three-fiber' I get a blank page I have also used const OrbitControls = dynamic( () => import("three/examples/jsm/controls/OrbitControls").then((mod) => mod.OrbitControls), { ssr: false } ); extend({ OrbitControls }); Please hel...
https://discourse.threejs.org/t/how-to-load-orbitcontrols-in-a-nextjs-page/23321

Installation
yarn add three react-three-fiber # or npm install three react-three-fiber Fiber is compatible with React v16.8+ and works with ReactDOM and React Native. Getting started with React Three Fiber is simple, but various frameworks may require particular attention.
https://website-git-switcher-pmndrs.vercel.app/react-three-fiber/getting-started/installation#next-js

Seonglae Cho