-
Notifications
You must be signed in to change notification settings - Fork 364
[babel-plugin] add debugFilePath option #1330
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
Conversation
|
Awesome! Just needs flow fixes. We have it in the backlog to create a more comprehensive dev tools extension. |
|
One change I would suggest is to not nest the config option under That is very specific to theming APIs and this work is more general than that, so it probably makes sense to make it a top-level config option. |
|
Sorry for the delay. I just pushed a commit that fixes the flow types and moves |
|
Let's rename the option to |
nmn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes themselves look good. Should be good to merge after a rebase and change the name of the config option.
…ution # Conflicts: # packages/@stylexjs/babel-plugin/src/utils/add-sourcemap-data.js
e21e13e to
b931d5d
Compare
|
Rebased, renamed, and updated PR subject/body. Thanks! |
What changed / motivation ?
I have an extremely basic chrome extension locally where I want to show the styles for an element and link to the "Sources" tab.
The problem I ran into was that filenames in
data-style-srcdo not have enough information for me to make achrome.devtools.panels.openResource()call when the link is clicked.My solution in this PR is to add
debugFilePathoption that we can use to customize the filenames used indata-style-src. In our case thedebugFilePathimplementation will be very similar to our logic in the our Rspackoutput.devtoolModuleFilenameTemplateconfig, which determines the filenames in the source map.We don't have an immediate need for this feature but I figured it was worth creating a PR to open the discussion. We are interested in any future devtools and out want to make sure they work for us. Thanks!
Pre-flight checklist
Contribution Guidelines