Followed the starter example in the repo but with changed assets.
I checked the one model with a gltf validator and it says it doesn’t have errors.
https://github.khronos.org/glTF-Validator/
got the model from here as well.
yet with or without this model. I get a series of errors and I have no clue what the issue is. What am I missing and/or does anyone have an idea on how to solve?
### Errors
ERROR in ./node_modules/@react-three/drei/core/softShadows.js 11:40
Module parse failed: Unexpected token (11:40)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| rings = 11
| } = {}) => `#define LIGHT_WORLD_SIZE ${size}
> #define LIGHT_FRUSTUM_WIDTH ${frustrum ?? frustum}
| #define LIGHT_SIZE_UV (LIGHT_WORLD_SIZE / LIGHT_FRUSTUM_WIDTH)
| #define NEAR_PLANE ${near}
@ ./node_modules/@react-three/drei/index.js 50:0-52 50:0-52
@ ./src/components/3d/Model.js
@ ./src/index.js
@ multi ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ErrorOverlayEntry.js ./src/index.js
ERROR in ./node_modules/@react-three/drei/web/Html.js 129:61
Module parse failed: Unexpected token (129:61)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| const transformOuterRef = React.useRef(null);
| const transformInnerRef = React.useRef(null);
> const target = (portal == null ? void 0 : portal.current) ?? gl.domElement.parentNode;
| React.useEffect(() => {
| if (group.current) {
@ ./node_modules/@react-three/drei/index.js 1:0-37 1:0-37
@ ./src/components/3d/Model.js
@ ./src/index.js
@ multi ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ReactRefreshEntry.js ./node_modules/@pmmmwh/react-refresh-webpack-plugin/client/ErrorOverlayEntry.js ./src/index.js
webpack config
test: /.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: require.resolve(‘babel-loader’),
options: {
plugins: [
isDevelopment &&
require.resolve(‘react-refresh/babel’),
].filter(Boolean),
},
package.json
"dependencies": {
"@react-three/drei": "^5.1.2",
"@react-three/fiber": "^6.1.5",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-three-fiber": "^4.2.21",
"three": "^0.128.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.2",
"babel-loader": "^8.1.0",
"css-loader": "^4.3.0",
"dei": "^0.1.0",
"html-webpack-plugin": "^4.4.1",
"react-refresh": "^0.8.3",
"style-loader": "^1.2.1",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"