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

Babel plugin with @xstyled/styled-components #287

Closed
salper opened this issue Jun 10, 2020 · 2 comments
Closed

Babel plugin with @xstyled/styled-components #287

salper opened this issue Jun 10, 2020 · 2 comments

Comments

@salper
Copy link
Contributor

salper commented Jun 10, 2020

I'm using a wrapper called @xstyled/styled-components for conveniency. But I can't benefit from the plugin as the top level import paths are static here:

const VALID_TOP_LEVEL_IMPORT_PATHS = [

Would you consider and allow a PR extending this list through plugin options?

@eugeneross
Copy link

eugeneross commented Feb 19, 2021

@salper did you manage to get this to work? Using the same wrapper library and have been searching for a solution.

EDIT: Figured it out.

Updated the babel-plugin-styled-components to ^1.12.0.

Added this in my babel config:

[
  "babel-plugin-styled-components",
  {
    "displayName": true,
    "topLevelImportPaths": [
      "@xstyled/styled-components"
    ],
  }
],

@salper
Copy link
Contributor Author

salper commented Mar 1, 2021

@eugeneross Sorry for the late answer. You did well.

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

No branches or pull requests

2 participants