diff --git a/.changeset/drop-dead-vos-version.md b/.changeset/drop-dead-vos-version.md new file mode 100644 index 0000000..36048ea --- /dev/null +++ b/.changeset/drop-dead-vos-version.md @@ -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 = ;` 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. diff --git a/packages/core/src/compiler/compileVosConfig.ts b/packages/core/src/compiler/compileVosConfig.ts index 6e90add..0a505c1 100644 --- a/packages/core/src/compiler/compileVosConfig.ts +++ b/packages/core/src/compiler/compileVosConfig.ts @@ -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 @@ -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).