Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

Better debugging of classnames #166

Closed
siddharthkp opened this issue Jan 10, 2018 · 2 comments
Closed

Better debugging of classnames #166

siddharthkp opened this issue Jan 10, 2018 · 2 comments
Assignees
Labels
🖥️api / dx Improvements to developer/user experience 🛠️ tooling beep boop blop

Comments

@siddharthkp
Copy link
Contributor

siddharthkp commented Jan 10, 2018

TL;DR: We'll be able to add better debugging for developers without having to eject from create-react-app

I really miss not having displayNames in the class to make the dev experience better. (Ref: https://www.styled-components.com/docs/tooling#better-debugging)

This is easy for apps with custom webpack configs, but if you're using create-react-app (some projects in the company do), there's no official way to do it.

react-app-rewired is one approach but it requires some configuration work from the developers, which I'm not a fan of (sample implementation)

Until now!

babel-plugin-macros were proposed in create-react-app back in July 2017 and are going to land in stable sometime in the near future (Merged PR: facebook/create-react-app#3675)

styled-components folks already have a working plugin-macro that would work

Here's a blog post about plugin-macros for the curious: https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros

@siddharthkp siddharthkp added 🖥️api / dx Improvements to developer/user experience 🛠️ tooling beep boop blop labels Jan 10, 2018
@siddharthkp siddharthkp self-assigned this Jan 10, 2018
@nkohari
Copy link
Contributor

nkohari commented Jun 5, 2018

@siddharthkp Is this something we still want to do?

@siddharthkp
Copy link
Contributor Author

Yes, but they don't have the macro ready yet 😢

I will add this eventually though, can close this issue though

@siddharthkp siddharthkp reopened this Aug 7, 2018
@siddharthkp siddharthkp changed the title Add babel-plugin-styled-components after babel-plugin-macros land in create-react-app Better debugging of classnames Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🖥️api / dx Improvements to developer/user experience 🛠️ tooling beep boop blop
Projects
None yet
Development

No branches or pull requests

2 participants