There are a few steps you can take to enable syntax highlighting for template literals in styled components:
Install the styled-components extension for your code editor, if available.
Install the babel-plugin-styled-components package via npm or yarn.
Add the plugin to your .babelrc file:
{
"plugins": [
"babel-plugin-styled-components"
]
}
Once you have completed these steps, syntax highlighting should be enabled for template literals in styled components.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-11-08 11:00:00 +0000
Seen: 13 times
Last updated: Jan 06 '22