Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/drop-dead-vos-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vosjs/core': patch
---

Drop the unused `VOS_VERSION` constant from compiled output. Every compiled module opened by declaring `const VOS_VERSION = <n>;` inside `initVos`, and nothing ever read it — not the runtime, not the bridge, not any consumer. The config's `version` field keeps its real job as the `migrateConfig` discriminator; only the dead emit goes.
3 changes: 0 additions & 3 deletions packages/core/src/compiler/compileVosConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ export function compileVosConfig(
throw new Error(`Invalid VosConfigJson:\n${issues}`)
}

const version = result.data.version

// Detect which addons are actually needed by scanning function strings
const detectedAddons = detectRequiredAddons(config)
// Declarative gltf objects need the loader even though no function string
Expand Down Expand Up @@ -222,7 +220,6 @@ ${utilEntries}


export const initVos = async (container, deps) => {
const VOS_VERSION = ${version};
const { THREE, gsap, resolution } = deps;

// Input data exposed as ctx.data (runtime deps.data overrides baked config.data; never undefined).
Expand Down
Loading