Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚀 Merging TemplateLiterals can result in StringLiterals (#27569)
* Merges can result in StringLiterals instead of TemplateLiterals * Convert single quasi template literals to string literals * Fix up number literals * comment on functionality * Add test for merging identifiers, refactor to use babel evaluate where safe, and add test condition for escaped template literal segment from a string * Use cooked value for stringliterals * Address PR comments * escape value when merging literal into template * Escaping for expression string in raw of quasi collapse * Move away from subpath removal since Babel 8 is unlikely to allow it
- Loading branch information
1 parent
3c8db36
commit 83e96f1
Showing
5 changed files
with
115 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters