three.js升级版本之后出现You may need an appropriate loader to handle this file type?

1、当使用three156版本时,在js中自定义某个类继承 THREE.BufferGeometry 会出现TypeError: Class constructor BufferGeometry cannot be invoked without 'new'
2、如果将three.js的版本改为167时,会出现 ERROR Failed to compile with 1 errors 18:54:20 error in ./node_modules/three/build/three.module.js Module parse failed: Unexpected token (34163:58) You may need an appropriate loader to handle this file type.
这个问题应该怎样解决?

期望提升three的版本之后不要报错且可正常运行

阅读 428
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进