npm package diff
Package: @forge/bundler
Versions: 6.1.3-next.7 - 6.1.3-next.8
File: package/out/nativeui.js
Index: package/out/nativeui.js
===================================================================
--- package/out/nativeui.js
+++ package/out/nativeui.js
@@ -8,29 +8,32 @@
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 = [];
- if (entryPoints.length > 0) {
- let bundlerOutputs;
+ await Promise.all(resources.map(async (resource) => {
+ const entryPoint = {
+ name: resource.key,
+ path: resource.path
+ };
+ let bundlerOutput;
try {
- bundlerOutputs = await Promise.all(entryPoints.map((entrypoint) => this.bundle({ appDirectory: '', entryPoints: [entrypoint], i18nConfig })));
+ bundlerOutput = await this.bundle({
+ appDirectory: '',
+ entryPoints: [entryPoint],
+ i18nConfig
+ });
}
catch (e) {
throw new types_1.BundlerError(e.message);
}
- bundlerOutputs.forEach(({ outputDir }, index) => {
- this.logger.debug(`NativeUI bundle created: ${outputDir}`);
- nativeUiBundlesDetails.push({
- ...resources[index],
- path: outputDir
- });
+ const { outputDir } = bundlerOutput;
+ this.logger.debug(`NativeUI bundle created: ${outputDir}`);
+ nativeUiBundlesDetails.push({
+ ...resource,
+ path: outputDir
});
- }
+ }));
return {
nativeUiBundlesDetails
};
}