9 Jul 2019

Webpack and three.js in forge applications

Default blog image

In the newer versions of forge viewers( v6 and above) three.js is included in the forge viwer js file itself.
So, when using webpack, mention three js in externals as it avoids loading three.js twice, which can cause few weird effects like theming not working properly.

const config = {
    …
    externals: {
        three: 'THREE'
    },

 

Thanks to Jan Liska for pointing it out.

Related Article