-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expose InlineSourceMap property #9566
Conversation
@@ -215,6 +215,10 @@ namespace Microsoft.ReactNative | |||
DOC_DEFAULT("8081") | |||
UInt16 SourceBundlePort { get; set; }; | |||
|
|||
DOC_STRING("Flag controlling whether the bundle URL requests inline source maps.") |
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.
For the other options that only affect when using the bundler server, we start the description with When using a @.UseFastRefresh, @.UseLiveReload, or @.UseWebDebugger
, which makes it clear that it wouldn't affect the generated bundle file. #Resolved
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.
I also like the more info in the snapshot property description about when you might want to turn this off. -- And this property is arguably the more important one to describe, since this is where the user will set the option.
FYI @tudorms I removed the backport labels in general because we don't restrict backports to anything 0.66+. Nothing to do with this change. |
if (auto instance = m_reactInstance.GetStrongPtr()) { | ||
return instance->InlineSourceMap(); | ||
} | ||
return 0; |
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.
return 0; | |
return false; | |
``` #Resolved |
@@ -75,6 +75,7 @@ void MainPage::OnLoadClick( | |||
host.InstanceSettings().DebuggerBreakOnNextLine(x_BreakOnFirstLineCheckBox().IsChecked().GetBoolean()); | |||
host.InstanceSettings().UseFastRefresh(x_UseFastRefreshCheckBox().IsChecked().GetBoolean()); | |||
host.InstanceSettings().DebuggerPort(static_cast<uint16_t>(std::stoi(std::wstring(x_DebuggerPort().Text())))); | |||
host.InstanceSettings().InlineSourceMap(true); |
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.
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.
Yes, true is default. I used this for testing and can revert. Initially planned to add a checkbox in Playground but the top bar is already too wide and wouldn't accommodate it.
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.
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.
can we rename the API / update the docs to clarify?
Hello @tudorms! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
* Expose InlineSourceMap property * Change files * Clarify comment in IDL * Address comment * Remove unneeded line * Rename public property to RequestInlineSourceMap * Fix bad merge
* Expose InlineSourceMap property * Change files * Clarify comment in IDL * Address comment * Remove unneeded line * Rename public property to RequestInlineSourceMap * Fix bad merge
* Expose InlineSourceMap property (#9566) * Expose InlineSourceMap property * Change files * Clarify comment in IDL * Address comment * Remove unneeded line * Rename public property to RequestInlineSourceMap * Fix bad merge * Fix changefile
Description
Give applications the ability to control the InlineSourceMap property value.
Type of Change
Why
We are currently hardcoding this to false for Hermes, because back in 2020 Hermes was choking with any inline source map larger than a few kilobytes. Things appear to work much better now, so the property will default to true, and -with this change- can be overridden by individual apps if needed.
Addresses the source map concern in #9407.
Microsoft Reviewers: Open in CodeFlow