Webpack and three.js in forge applications

牧云@^-^@ 提交于 2021-01-29 05:46:17

问题


I'm struggling a bit with the new viewer version 7 and the inclusion of three.js. According to

https://forge.autodesk.com/blog/webpack-and-threejs-forge-applications

it is necessary to define three.js as external. But where exactly do I do that? The viewer is embedded in an Angular environment.


回答1:


Don't add THREE as dependency in package.json and use the THREE global loaded by the viewer. If you just need the THREE types: (https://www.npmjs.com/package/@types/forge-viewer)



来源:https://stackoverflow.com/questions/57817235/webpack-and-three-js-in-forge-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!