npm package diff

Package: @forge/bundler

Versions: 6.1.2-next.0-experimental-8a53773 - 6.1.2-next.2

File: package/out/nativeui.js

Index: package/out/nativeui.js
===================================================================
--- package/out/nativeui.js
+++ package/out/nativeui.js
@@ -8,39 +8,31 @@
     async getConfig({ entryPoints, i18nConfig }) {
         return (0, nativeui_1.getNativeUiBuildConfig)(entryPoints, i18nConfig);
     }
     async bundleResources(resources, i18nConfig) {
+        const entryPoints = resources.map(({ key, path }) => ({
+            name: key,
+            path
+        }));
         const nativeUiBundlesDetails = [];
-        let combinedMetadata = (0, types_1.emptyMetadata)();
-        await Promise.all(resources.map(async (resource) => {
-            const entryPoint = {
-                name: resource.key,
-                path: resource.path
-            };
-            let bundlerOutput;
+        if (entryPoints.length > 0) {
+            let bundlerOutputs;
             try {
-                bundlerOutput = await this.bundle({
-                    appDirectory: '',
-                    entryPoints: [entryPoint],
-                    i18nConfig
-                });
+                bundlerOutputs = await Promise.all(entryPoints.map((entrypoint) => this.bundle({ appDirectory: '', entryPoints: [entrypoint], i18nConfig })));
             }
             catch (e) {
                 throw new types_1.BundlerError(e.message);
             }
-            const { outputDir, metadata } = bundlerOutput;
-            this.logger.debug(`NativeUI bundle created: ${outputDir}`);
-            nativeUiBundlesDetails.push({
-                ...resource,
-                path: outputDir
+            bundlerOutputs.forEach(({ outputDir }, index) => {
+                this.logger.debug(`NativeUI bundle created: ${outputDir}`);
+                nativeUiBundlesDetails.push({
+                    ...resources[index],
+                    path: outputDir
+                });
             });
-            if (metadata) {
-                combinedMetadata = (0, types_1.mergeMetadata)(combinedMetadata, metadata);
-            }
-        }));
+        }
         return {
-            nativeUiBundlesDetails,
-            metadata: combinedMetadata
+            nativeUiBundlesDetails
         };
     }
 }
 exports.NativeUIBundler = NativeUIBundler;