-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Get sourcemaps working #4293
Get sourcemaps working #4293
Conversation
* get sourcemaps working * remove replace plugin dependency * lint
...{ | ||
_DEBUG: 1, | ||
_PROFILER: 1 | ||
} |
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.
This looks a bit verbose/strange, why not just add the properties directly? Saves two lines and indentation.
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.
Not really sure what you mean, could you give an example?
...{ | ||
_PROFILER: 1 | ||
} |
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.
Same here, this should be a simple property?
GitHub is acting strange for some reason, first the comments doubled and now they are still pending: I will just write it once more and try to explain it here. Code like this: o = {
...{
...{
...{
...{
...{
...{
...{
...{
a: 123
}
}
}
}
}
}
}
}
} Is basically the same as: Lines 205 to 216 in bf628f2
Line 215: https://github.com/aMarCruz/jscc/blob/7f8634b9677097c0e16311caae27937ff69d7f51/index.d.ts#L86-L93 |
Hi @kungfooman , Sourcemaps true will create a separate .map file. Sourcemaps inline will place them in the output module. As for the destructuring assignment, you may have missed that _PROFILE etc is being combined with sdkVersion object. I didn't want to duplicate the version members multiple times. This was the most straightforward method I could think of, but agree it's still rather messy. |
(Oh and jscc declares the variable a boolean, but says to match it to the output sourcemap value, which is inline. I chose to keep inline because it's a little more explicit and works). |
Hi @slimbuck thank you for your quick answer, I made a little example to demonstrate what I mean: const version = 'version 1';
const revision = 'revision 2';
const sdkVersion = {
_CURRENT_SDK_VERSION: version,
_CURRENT_SDK_REVISION: revision
};
const values1 = {
...sdkVersion,
_DEBUG: 1,
_PROFILER: 1
}
const values2 = {
...sdkVersion,
...{
_DEBUG: 1,
_PROFILER: 1
}
}
console.log(values1, values2);
You are defining |
OIC what you mean, yeah that's definitely neater. As for jscc inline, we could probably get rid of it. |
Fixes: #3996
This PR updates the engine rollup build script as follows:
With these changes in place sourcemaps work correctly in Chrome.