@forge/bundler

7.2.3-next.15-experimental-fd0ebbc7.2.3-next.17
out/runtime.js
~out/runtime.jsModified
+3−10
Index: package/out/runtime.js
===================================================================
--- package/out/runtime.js
+++ package/out/runtime.js
@@ -21,21 +21,14 @@
 async function getRuntimeArtifacts(provider, args) {
     const result = new Map();
     const wrapper = await provider.getNodeRuntimeWrapper();
     const loader = await provider.getNodeRuntimeLoader();
-    let entrypointScript;
-    if (loader) {
-        entrypointScript = loader;
-        result.set(NODE_RUNTIME_BACKUP_WRAPPER_FILE, Buffer.from(wrapper.script));
-    }
-    else {
-        entrypointScript = wrapper;
-    }
-    result.set(exports.NODE_RUNTIME_CODE_FILE, Buffer.from(entrypointScript.script));
+    result.set(exports.NODE_RUNTIME_CODE_FILE, Buffer.from(loader.script));
+    result.set(NODE_RUNTIME_BACKUP_WRAPPER_FILE, Buffer.from(wrapper.script));
     if (process.env.FORGE_RUNTIME_PATH) {
         result.set(NODE_RUNTIME_USE_LOCAL_WRAPPER_FILE, Buffer.from('Local wrapper used'));
     }
-    result.set(NODE_RUNTIME_VERSION_FILE, Buffer.from(JSON.stringify({ version: entrypointScript.version }, null, 2)));
+    result.set(NODE_RUNTIME_VERSION_FILE, Buffer.from(JSON.stringify({ version: loader.version }, null, 2)));
     if (args.i18nResourceBundle) {
         for (const [fileName, filePath] of (0, cli_shared_1.listFilesInI18nResourceBundle)(args.i18nResourceBundle)) {
             result.set(path_1.default.join(i18n_1.I18N_BUNDLE_FOLDER_NAME, fileName), filePath);
         }