Skip to content

fix: avoid bundling svelte/compiler for analytics version#202

Open
smart wants to merge 1 commit intocloudinary-community:mainfrom
smart:fix/remove-svelte-compiler-import-201
Open

fix: avoid bundling svelte/compiler for analytics version#202
smart wants to merge 1 commit intocloudinary-community:mainfrom
smart:fix/remove-svelte-compiler-import-201

Conversation

@smart
Copy link
Copy Markdown

@smart smart commented Mar 25, 2026

Summary

  • replace the svelte/compiler import in config.ts with VERSION from svelte to avoid pulling compiler code into client bundles
  • make version normalization resilient when runtime VERSION is unavailable by falling back to 0.0.0
  • update the svelte mock in config.test.ts to include VERSION

Test plan

  • node packages/svelte-cloudinary/scripts/version.js
  • pnpm --filter svelte-cloudinary test
  • pnpm --filter svelte-cloudinary build

Made with Cursor

Use the runtime svelte VERSION export for analytics techVersion instead of importing from svelte/compiler, which prevents pulling compiler code into consumer bundles.

Made-with: Cursor
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

@smart is attempting to deploy a commit to the Cloudinary DevX Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 25, 2026

⚠️ No Changeset found

Latest commit: ec31cf3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Collaborator

@ghostdevv ghostdevv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be the right fix, as I don't think VERSION is exported from the root svelte package even in v5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants