@forge/bundler

7.1.07.1.1-next.0
out/config/nativeui.js
~out/config/nativeui.jsModified
+5−5
Index: package/out/config/nativeui.js
===================================================================
--- package/out/config/nativeui.js
+++ package/out/config/nativeui.js
@@ -7,9 +7,9 @@
 const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
 const cli_shared_1 = require("@forge/cli-shared");
 const common_1 = require("./common");
 const WORKER_OUTPUT_SUBDIR = '__worker__';
-const getBundleAnalyzerPlugin = (statsFilename) => process.env.FORGE_INSPECT_ARCHIVE
+const getBundleAnalyzerPlugin = (statsFilename, inspect) => inspect
     ? new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
         analyzerMode: 'disabled',
         generateStatsFile: true,
         statsFilename: path_1.default.join(process.cwd(), statsFilename),
@@ -60,9 +60,9 @@
             }
         ]
     }
 };
-const getNativeUiBuildConfig = (entrypoints, i18nConfig) => {
+const getNativeUiBuildConfig = (entrypoints, i18nConfig, inspect) => {
     const resolvedEntryPoints = {};
     const htmlPlugins = [];
     for (const entrypoint of entrypoints) {
         if (entrypoint.name === WORKER_OUTPUT_SUBDIR) {
@@ -94,16 +94,16 @@
                     }
                 }
             }
             : {}),
-        plugins: [...htmlPlugins, getBundleAnalyzerPlugin('.forge_app_inspect_stats.json')].filter(Boolean),
+        plugins: [...htmlPlugins, getBundleAnalyzerPlugin('.forge_app_inspect_stats.json', inspect)].filter(Boolean),
         module: {
             rules: [...(i18nConfig ? [(0, common_1.geti18nRule)(i18nConfig)] : []), ...baseNativeUiConfig.module.rules]
         }
     };
 };
 exports.getNativeUiBuildConfig = getNativeUiBuildConfig;
-const getNativeUiWorkerBuildConfig = (entrypoints, i18nConfig, baseOutputDir) => {
+const getNativeUiWorkerBuildConfig = (entrypoints, i18nConfig, baseOutputDir, inspect) => {
     const resolvedEntryPoints = {};
     for (const entrypoint of entrypoints) {
         const outputEntryName = entrypoint.isMultiEntry ? entrypoint.name : 'main';
         resolvedEntryPoints[outputEntryName] = path_1.default.resolve(entrypoint.path);
@@ -128,9 +128,9 @@
         optimization: {
             splitChunks: false,
             runtimeChunk: false
         },
-        plugins: [getBundleAnalyzerPlugin('.forge_app_worker_inspect_stats.json')].filter(Boolean),
+        plugins: [getBundleAnalyzerPlugin('.forge_app_worker_inspect_stats.json', inspect)].filter(Boolean),
         module: {
             rules: [...(i18nConfig ? [(0, common_1.geti18nRule)(i18nConfig)] : []), ...baseNativeUiConfig.module.rules],
             parser: {
                 javascript: {