// current
import * as THREE from 'three';
// suggestion
import THREE from 'three';
Usually, I prefer to import only what I need in a module:
Module: camera.js
import { PerspectiveCamera } from 'three';
Module: renderer.js
import { WebGLRenderer } from 'three';
Yeah, I don't think we can do this, sorry. See https://rollupjs.org/guide/en/#default-export —
This practice is only recommended if your source module only has one export.
It is bad practice to mix default and named exports in the same module, though it is allowed by the specification.
Most helpful comment
Usually, I prefer to import only what I need in a module:
Module:
camera.jsModule:
renderer.js