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(default-replacer): (?:\.(js|json)$) should be replaced by (?:\\.(js|json)$) #131

Merged
merged 1 commit into from
Jul 18, 2022

Conversation

izumiya
Copy link
Contributor

@izumiya izumiya commented Jul 16, 2022

This PR solves the following problem.

console.log(`(?:\.(js|json)$)`); // results (?:.(js|json)$).
  • This expression would match "{any character}js" or "{any character}json" when it is expected to match ".js" or ".json" .
  • If the file name ends with "-json.js", the import will fail as in the attached test project22.

@izumiya izumiya changed the title fix(default-replacer): (?:\.(js|json)$) should be (?:\\.(js|json)$) fix(default-replacer): (?:\.(js|json)$) should be replaced by (?:\\.(js|json)$) Jul 17, 2022
@justkey007 justkey007 closed this Jul 18, 2022
@justkey007 justkey007 reopened this Jul 18, 2022
@justkey007 justkey007 merged commit a6e465f into justkey007:master Jul 18, 2022
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