Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -2535,7 +2535,15 @@ def generate_traditional_runtime_html(target, options, js_target, target_basenam
# Normal code generation path
script.src = base_js_target

if not settings.SINGLE_FILE:
# inline script for SINGLE_FILE output
if settings.SINGLE_FILE:
js_contents = script.inline or ''
if script.src:
js_contents += read_file(js_target)
delete_file(js_target)
script.src = None
script.inline = js_contents
else:
if not settings.WASM_ASYNC_COMPILATION:
# We need to load the wasm file before anything else, since it
# has be synchronously ready.
Expand Down Expand Up @@ -2569,15 +2577,6 @@ def generate_traditional_runtime_html(target, options, js_target, target_basenam
}
''' % (script.inline, get_subresource_location(wasm_target) + '.js')

# inline script for SINGLE_FILE output
if settings.SINGLE_FILE:
js_contents = script.inline or ''
if script.src:
js_contents += read_file(js_target)
delete_file(js_target)
script.src = None
script.inline = js_contents

shell = do_replace(shell, '{{{ SCRIPT }}}', script.replacement())
shell = shell.replace('{{{ SHELL_CSS }}}', utils.read_file(utils.path_from_root('src/shell.css')))
logo_filename = utils.path_from_root('media/powered_by_logo_shell.png')
Expand Down
Loading