CesiumGS / obj2gltf

Convert OBJ assets to glTF
Apache License 2.0
1.7k stars 305 forks source link

Wont work on react.js #188

Open IbrahimCanKALYA opened 5 years ago

IbrahimCanKALYA commented 5 years ago

I am trying to use library for my react.js project but when i am importing the library and trying the example i am getting this error ; ./node_modules/cesium/index.js SyntaxError: C:\Users\ibocan\Desktop\Kepler\Frontend\node_modules\cesium\index.js: 'return' outside of function (9:4)

7 | if (process.env.NODE_ENV === 'production') { 8 | module.exports = require(path.join(__dirname, 'Build/Cesium/Cesium'));

9 | return; | ^ 10 | } 11 | 12 | // Otherwise, use un-optimized requirejs modules for improved error checking. For example 'development' mode

My dependincies; react.js:

"react": "^16.8.0",
"react-dom": "^16.8.0",
"obj2gltf": "^3.0.2",

could someone help me ?

thanks in advence