Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(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
- Loading branch information