Hi, we received some issues on the `react-three-fiber` and `drei` repos, mentioning broken ssr because of some examples where we import three's examples - like to implement loaders or controls.
This PR adds a next.config suggested by many that transpiles everything in three, drei and postprocessing.
I also added some code from `drei` that shows how controls and effects can be easily added.
The existing example gives an error on every hot reload, perhaps because of the way that an initial `useEffect` hook imports the `GLTFLoader` and it doesn't redo that on hot reload?
Putting the component using the `useLoader` hook in a dynamic import seems to fix this.
Open to better suggestions, this is kind of awkward to use still...
This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples
- with-zeit-fetch
- with-yarn-workspaces
- with-why-did-your-render
- with-video-js
- with-universal-configuration-runtime
- with-typestyle
- with-three-js
If you have a suggestion or change I'd appreciate it
* With threejs example
* static folder replaced with public folder - linting issues resolved
* CR- gitignore removed- readmea updated- css files and package removed
* used plain css file insteaded of styled component
* built in css added
Co-authored-by: welcomebackfda <54882055+welcomebackfda@users.noreply.github.com>