2 ms·
Random and specific issue, does anyone know the current status of tree-shaking in three.js? There was some issue with not being able to shake through Object.def
by zawerf 9y ago
Random and specific issue, does anyone know the current status of tree-shaking in three.js? There was some issue with not being able to shake through Object.defineProperty: https://github.com/mrdoob/three.js/issues/10711 https://github.com/mrdoob/three.js/issues/10711
- bhouston 9y agoYou can build your own build by modifying src/Three.js as it imports everything there.
- mlsarecmg 9y agoThis is how we are doing it in webpack, i think rollup can alias as well: webpack.config.js alias: { three$: path.resolve('./three.js') } and a local copy of three.js // Only export the things that are actually needed, cut out everything else export { WebGLRenderer } from 'three/src/renderers/WebGLRenderer.js'; export { ShaderLib } from 'three/src/renderers/shaders/ShaderLib.js'; export { UniformsLib } from 'three/src/renderers/shaders/UniformsLib.js'; ...