I'm getting the following warning when trying to use @react-three/fiber and @react-three/drei in the same project.
Steps to reproduce
npx create-react-app reproduced-warning
cd reproduced-warning
npm install three @react-three/fiber @react-three/drei
My src/App.js file looks like this:
import React from 'react';
import { Canvas } from '@react-three/fiber';
import { Stats } from '@react-three/drei';
import './App.css';
const App = (props) => {
return (
<div className="App">
<Canvas />
</div>
);
};
export default App;
To start the App run npm run start.
Module information
threeat^0.128.0@react-three/fiberat^6.0.16@react-three/dreiat^4.2.0
Updated (4 May 2021)
Additional information
Did a bundle analysis and got the following results:
// Used these imports
import React from 'react';
import { Canvas } from '@react-three/fiber';
import { Stats } from '@react-three/drei';
// Used these imports
import React from 'react';
import { Canvas } from '@react-three/fiber';
Tried the same for the production build but it did not appear to have the duplicate three.module.js entry. It looks like this only happens in development, any idea why?


