output.js: fix broken breakpoints in debug builds (closes #1872)
::SOURCE_FILE:: must appear on the first line so that the .js.map line numbers match with our generated .js file line numbers
Added a comment to explain why that part of the file isn't formatted nicely with line breaks like the rest of the file.
This partially reverts bbcb8bea07
This commit is contained in:
@@ -1,10 +1,17 @@
|
|||||||
var $lime_init = (function ($hx_exports, $global) {
|
var $lime_init = (function ($hx_exports, $global) { "use strict"; var $hx_script = (function (exports, global) { ::SOURCE_FILE::
|
||||||
"use strict";
|
});::if false::
|
||||||
|
/*
|
||||||
|
Don't insert or remove any line breaks in the code above this line!
|
||||||
|
|
||||||
var $hx_script = (function (exports, global) {
|
::SOURCE_FILE:: must start on the first line.
|
||||||
::SOURCE_FILE::
|
|
||||||
});
|
|
||||||
|
|
||||||
|
Breakpoints in debug builds won't work if this file's line numbers don't
|
||||||
|
match the .js.map file's expected line numbers exactly.
|
||||||
|
|
||||||
|
Additionally, the }); after ::SOURCE_FILE:: must appear on the next line
|
||||||
|
to avoid it getting ignored in a // comment at the end of ::SOURCE_FILE::.
|
||||||
|
*/
|
||||||
|
::end::
|
||||||
if (typeof self !== "undefined" && self.constructor.name.includes("Worker")) {
|
if (typeof self !== "undefined" && self.constructor.name.includes("Worker")) {
|
||||||
// No need for exports in a worker context, just initialize statics.
|
// No need for exports in a worker context, just initialize statics.
|
||||||
$hx_script({}, $global);
|
$hx_script({}, $global);
|
||||||
|
|||||||
Reference in New Issue
Block a user