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

(fix): change plugin order to make styled-components/macro work #644

Merged
merged 1 commit into from
Sep 17, 2020

Commits on Sep 17, 2020

  1. (fix): change plugin order to make styled-components/macro work

    - if babel-plugin-macros is first, macros get applied first
      - babel-plugin-styled-components says it should be placed first, but
        unfortunately all user plugins are added after TSDX plugins
        - unknown how changing this ordering could impact lots of code out
          there, but could be very breaking.
          - moving to a preset instead would mean this is more in user
            control
      - but we can change it so macros are added first and so one can use
        styled-components/macro instead as a workaround
    
    - based on babel-plugin-styled-component's code, docs, and output in
      detail, I think its ordering conflict may be with
      babel-plugin-annotate-pure-calls, which so happens to be the first
      plugin in babelPluginTsdx
      - maybe this should be last given that other plugins can change
        functions etc
    
    (test): update styled-component template tag test to reflect the
    slightly different tag due to the usage of the macro
    
    (fix/test): comment removal should use toBeFalsy, not toBeTruthy,
    since it's removed
    - this was a bug I introduced when adding the grep helper; just added
      it the same everywhere but this was the one place that was testing
      to get an error code
      - fix the comment so it doesn't say error code anymore either
      - since this test was skipped, I didn't pick up that it was wrong
        until it ran now
    agilgur5 committed Sep 17, 2020
    Configuration menu
    Copy the full SHA
    5bf22ad View commit details
    Browse the repository at this point in the history