Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-sfc): don't match property access in dev mode import usage check #8897

Closed

Conversation

ah-dc
Copy link

@ah-dc ah-dc commented Aug 2, 2023

@ah-dc ah-dc requested a review from sxzz August 3, 2023 06:29
@sxzz sxzz added the ready to merge The PR is ready to be merged. label Aug 3, 2023
@@ -20,7 +20,7 @@ export function isImportUsed(local: string, sfc: SFCDescriptor): boolean {
return new RegExp(
// #4274 escape $ since it's a special char in regex
// (and is the only regex special char that is valid in identifiers)
`[^\\w$_]${local.replace(/\$/g, '\\$')}[^\\w$_]`
`[^\\w$.]${local.replace(/\$/g, '\\$')}[^\\w$]`
Copy link
Contributor

Choose a reason for hiding this comment

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

@yyx990803
Copy link
Member

I decided to rethink how import usage check should work and implemented AST-based checks in #9729

Still, thanks for the PR!

@yyx990803 yyx990803 closed this Dec 1, 2023
sxzz referenced this pull request in vuejs/core-vapor Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR is ready to be merged.
Projects
Status: Rejected
Development

Successfully merging this pull request may close these issues.

None yet

4 participants