set debug flag at the start of worker code
This commit is contained in:
parent
d6aaa473af
commit
79061fa127
3 changed files with 11 additions and 5 deletions
8
app.js
8
app.js
|
|
@ -668,7 +668,10 @@ function concatCode(array) {
|
|||
// in debug mode, the script should load dependent
|
||||
// scripts instead of serving a complete bundle
|
||||
if (debug) {
|
||||
const code = [ '(function() { let load = [ ' ];
|
||||
const code = [
|
||||
'self.debug=true;',
|
||||
'(function() { let load = [ '
|
||||
];
|
||||
direct.forEach(file => {
|
||||
const vers = cachever[file] || dversion || version;
|
||||
code.push(`"/${file.replace(/\\/g,'/')}?${vers}",`);
|
||||
|
|
@ -683,8 +686,7 @@ function concatCode(array) {
|
|||
's.src = file;',
|
||||
's.onload = load_next;',
|
||||
'document.head.appendChild(s);',
|
||||
'} load_next(); })();',
|
||||
'self.debug=true;'
|
||||
'} load_next(); })();'
|
||||
].join('\n'));
|
||||
inject.forEach(key => {
|
||||
code.push(synth[key]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue