Skip to content

Prevent removal of constant in transformation#46

Open
RSamaium wants to merge 4 commits intov2from
cursor/prevent-removal-of-constant-in-transformation-ebc4
Open

Prevent removal of constant in transformation#46
RSamaium wants to merge 4 commits intov2from
cursor/prevent-removal-of-constant-in-transformation-ebc4

Conversation

@RSamaium
Copy link
Owner

@RSamaium RSamaium commented Jul 2, 2025

Preserve defineProps variables and imports in the compiler to prevent their removal when used in templates.

Previously, TypeScript's dead code elimination would remove variables declared with defineProps() and unused imports from the script, even if they were actively referenced within the component's template, leading to runtime ReferenceErrors.

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