Skip to content

How to see Styled Components' names (class names) in inspector? #4293

Closed Answered by HIPPIEKICK
HIPPIEKICK asked this question in Q&A
Discussion options

You must be logged in to vote

Installing babel-plugin-styled-components solved it, so:

npm install --save-dev babel-plugin-styled-components

and then updating vite.config.js:

export default defineConfig({
  plugins: [
    react({
      babel: {
        plugins: ["styled-components"],
        babelrc: false,
        configFile: false
      }
    })
  ]
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HIPPIEKICK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant