svelthree
svelthree copied to clipboard
Examine / nail down `SvelteKit` / `Vite` classes suffixing (if duplicate class names) and chunks naming
- Class suffixing is a bit of a black box to me. Seems to vary depending on the process (dev / build) and SSR / CSR.
- Also some chunk-names seem to be random.
BUILD
vite.config:
ssr: { noExternal: ['three'] }optimizeDeps: { include: ['three', 'svelthree/utils', 'svelthree/stores'] }
svelte.config:
ssr: true
.svelte-kit/output/client/_app/immutable/chunks/OrbitControls-#.js
contains almost all of the three-stuff incl.:
three/examples/jsm/controls/OrbitControls,three/examples/jsm/helpers/RectAreaLightHelperthree/examples/jsm/loaders/GLTFLoaderthree/examples/jsm/loaders/DRACOLoaderTHREE.WebGLRenderer(function) etc.
and some (not all) svelthree-components:
- SvelthreeInteraction
- Mesh (not suffixed)
- Canvas
- Scene (not suffixed)
- WebGLRenderer_1 (suffixed -> because THREE.WebGLRenderer isn't a class / is function?)
corresponding / same named THREE-stuff is suffixed by $1
- Mesh$1
- Scene$1
- except function WebGLRenderer (instead the
svelthree-component got renamed toWebGLRenderer_1)
bundled together (which is also by far the biggest chunk).
It seems that the most used components + the most of the three-stuff is bundled together.
vs.
(same name, different hash)
.svelte-kit/output/client/_app/immutable/chunks/OrbitControls-#.js which contains the OrbitControls-svelthree-component only, which is ok concerning naming.