4 ms·
This 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
by mlsarecmg 9y ago
This 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';
...