vue-cli2 中引入three.js报错,提示loader缺少

ranger12
  • 29

vue-cli2 中引入three.js报错,提示loader缺少问题,这个该怎么解决,小白求助

"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
"webpack-dev-server": "^2.9.1",
"webpack-merge": "^4.1.0"

> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

(node:5224) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.(Use `node --trace-deprecation ...` to show where the warning was created)
 13% building modules 26/31 modules 5 active ...x=0!E:\test\thcode\t3demo\src\App.vue{ parser: "babylon" } is deprecated; we now treat it as { parser: "babel" }.
 94% asset optimization

 ERROR  Failed to compile with 1 errors                                               下午4:36:28
 error  in ./node_modules/_three@0.132.2@three/build/three.module.js

Module parse failed: Unexpected token (2516:25)
You may need an appropriate loader to handle this file type.
|
|               this.texture = source.texture.clone();
|               this.texture.image = { ...this.texture.image }; // See #20328.
|
|               this.depthBuffer = source.depthBuffer;

 @ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src
回复
阅读 520
1 个回答

降低的threejs的版本0.128.0

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

宣传栏