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

feat: macro can customize importModuleName #3422

Merged

Commits on Mar 10, 2021

  1. feat: macro can customize importModuleName

    If `styled` should come from a wrapper instead of directly from
    styled-components, this enables users of the macro to customize the
    import by configuring in `packages.json`:
    
        "babelMacros": {
          "styledComponents": {
            "importModuleName": "my-styled-components"
          }
        }
    
    Previously similar functionality landed in
    babel-plugin-styled-components so users of the plugin could use
    a wrapper at that level, but it wasn't available to users of the macro.
    This builds on that work by passing the customized module name through
    to the plugin. Consequently we also update the dependency to ensure the
    plugin supports `topLevelImportPaths`
    
    See styled-components/babel-plugin-styled-components@325167b
    
    Fixes styled-components/xstyled#44
    agriffis committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    83c8b0c View commit details
    Browse the repository at this point in the history