babel-plugin-styled-components icon indicating copy to clipboard operation
babel-plugin-styled-components copied to clipboard

Support auto import

Open otomad opened this issue 2 years ago • 0 comments

I am using unplugin-auto-import with babel-plugin-styled-components.

Then we didn't required to explicit import { styled, createGlobalStyle } from "styled-components" and so on, just directly use them.

However, babel-plugin-styled-components doesn't recognize it, the styles won't be minify or use displayName unless you explicit import them.

How about add an option, then whether or not import them, just detect with keyword styled, createGlobalStyle and so on?

otomad avatar Oct 20 '23 14:10 otomad