@rnx-kit/cli 0.12.7 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -0
- package/README.md +90 -65
- package/coverage/clover.xml +92 -104
- package/coverage/coverage-final.json +7 -6
- package/coverage/lcov-report/index.html +29 -29
- package/coverage/lcov-report/src/bundle/index.html +29 -29
- package/coverage/lcov-report/src/bundle/kit-config.ts.html +63 -117
- package/coverage/lcov-report/src/bundle/metro.ts.html +40 -163
- package/coverage/lcov-report/src/bundle/overrides.ts.html +28 -58
- package/coverage/lcov-report/src/bundler-plugin-defaults.ts.html +115 -0
- package/coverage/lcov-report/src/copy-assets.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +26 -11
- package/coverage/lcov-report/src/metro-config.ts.html +49 -31
- package/coverage/lcov-report/src/typescript/index.html +1 -1
- package/coverage/lcov-report/src/typescript/project-cache.ts.html +5 -5
- package/coverage/lcov.info +173 -193
- package/lib/bundle/kit-config.d.ts +9 -15
- package/lib/bundle/kit-config.d.ts.map +1 -1
- package/lib/bundle/kit-config.js +34 -43
- package/lib/bundle/kit-config.js.map +1 -1
- package/lib/bundle/metro.d.ts +7 -11
- package/lib/bundle/metro.d.ts.map +1 -1
- package/lib/bundle/metro.js +21 -59
- package/lib/bundle/metro.js.map +1 -1
- package/lib/bundle/overrides.d.ts +11 -9
- package/lib/bundle/overrides.d.ts.map +1 -1
- package/lib/bundle/overrides.js +10 -18
- package/lib/bundle/overrides.js.map +1 -1
- package/lib/bundle/types.d.ts +4 -17
- package/lib/bundle/types.d.ts.map +1 -1
- package/lib/bundle.d.ts +8 -7
- package/lib/bundle.d.ts.map +1 -1
- package/lib/bundle.js +8 -35
- package/lib/bundle.js.map +1 -1
- package/lib/bundler-plugin-defaults.d.ts +3 -0
- package/lib/bundler-plugin-defaults.d.ts.map +1 -0
- package/lib/bundler-plugin-defaults.js +13 -0
- package/lib/bundler-plugin-defaults.js.map +1 -0
- package/lib/clean.js +106 -117
- package/lib/clean.js.map +1 -1
- package/lib/copy-assets.js +194 -210
- package/lib/copy-assets.js.map +1 -1
- package/lib/dep-check.js +12 -7
- package/lib/dep-check.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/metro-config.d.ts +3 -2
- package/lib/metro-config.d.ts.map +1 -1
- package/lib/metro-config.js +7 -5
- package/lib/metro-config.js.map +1 -1
- package/lib/parsers.d.ts +2 -0
- package/lib/parsers.d.ts.map +1 -1
- package/lib/parsers.js +16 -1
- package/lib/parsers.js.map +1 -1
- package/lib/serve/kit-config.d.ts +6 -5
- package/lib/serve/kit-config.d.ts.map +1 -1
- package/lib/serve/kit-config.js +21 -6
- package/lib/serve/kit-config.js.map +1 -1
- package/lib/start.d.ts +2 -2
- package/lib/start.d.ts.map +1 -1
- package/lib/start.js +146 -158
- package/lib/start.js.map +1 -1
- package/package.json +9 -6
- package/react-native.config.js +65 -59
- package/src/bundle/kit-config.ts +42 -60
- package/src/bundle/metro.ts +15 -56
- package/src/bundle/overrides.ts +24 -34
- package/src/bundle/types.ts +17 -23
- package/src/bundle.ts +18 -36
- package/src/bundler-plugin-defaults.ts +10 -0
- package/src/index.ts +1 -1
- package/src/metro-config.ts +12 -6
- package/src/parsers.ts +19 -0
- package/src/serve/kit-config.ts +23 -11
- package/src/start.ts +23 -29
- package/test/bundle/__mocks__/@rnx-kit/config.js +2 -3
- package/test/bundle/__mocks__/@rnx-kit/console.js +1 -0
- package/test/bundle/__mocks__/@rnx-kit/metro-service.js +1 -0
- package/test/bundle/kit-config.test.ts +102 -100
- package/test/bundle/metro.test.ts +58 -98
- package/test/bundle/overrides.test.ts +29 -25
- package/test/copy-assets/assembleAarBundle.test.ts +1 -0
- package/lib/types.d.ts +0 -5
- package/lib/types.d.ts.map +0 -1
- package/lib/types.js +0 -3
- package/lib/types.js.map +0 -1
- package/src/types.ts +0 -4
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import type { BundleDefinitionWithRequiredParameters } from "@rnx-kit/config";
|
|
2
1
|
import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
|
|
3
|
-
import type {
|
|
4
|
-
/**
|
|
5
|
-
* Get a bundle definition from the kit configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param id Optional bundle definition id. Only needed when the kit config has more than one definition.
|
|
8
|
-
* @returns Bundle definition matching the id (if given), or the first bundle definition found. `undefined` if bundling is disabled or not supported for the kit.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getKitBundleDefinition(id?: string): BundleDefinitionWithRequiredParameters | undefined;
|
|
2
|
+
import type { CliPlatformBundleConfig } from "./types";
|
|
11
3
|
/**
|
|
12
4
|
* Get the list of target platforms for bundling.
|
|
13
5
|
*
|
|
@@ -17,13 +9,15 @@ export declare function getKitBundleDefinition(id?: string): BundleDefinitionWit
|
|
|
17
9
|
*/
|
|
18
10
|
export declare function getTargetPlatforms(overridePlatform?: AllPlatforms, targetPlatforms?: AllPlatforms[]): AllPlatforms[];
|
|
19
11
|
/**
|
|
20
|
-
* Get bundle configuration and target platform(s) from kit
|
|
21
|
-
*
|
|
22
|
-
*
|
|
12
|
+
* Get the bundle configuration and target platform(s) from the rnx-kit
|
|
13
|
+
* configuration. Use them to create an array of platform-specific
|
|
14
|
+
* bundle configurations.
|
|
15
|
+
*
|
|
16
|
+
* If an id is given, search for the matching bundle definition. Otherwise, use the first bundle definition.
|
|
23
17
|
*
|
|
24
|
-
* @param id Optional
|
|
18
|
+
* @param id Optional identity of the target bundle definition to return
|
|
25
19
|
* @param overridePlatform Override platform, typically from the command-line. When given, this overrides the list of target platforms.
|
|
26
|
-
* @returns Arrary of
|
|
20
|
+
* @returns Arrary of platform-specific bundle configurations
|
|
27
21
|
*/
|
|
28
|
-
export declare function
|
|
22
|
+
export declare function getCliPlatformBundleConfigs(id?: string, overridePlatform?: AllPlatforms): CliPlatformBundleConfig[];
|
|
29
23
|
//# sourceMappingURL=kit-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-config.d.ts","sourceRoot":"","sources":["../../src/bundle/kit-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kit-config.d.ts","sourceRoot":"","sources":["../../src/bundle/kit-config.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAGvD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,gBAAgB,CAAC,EAAE,YAAY,EAC/B,eAAe,CAAC,EAAE,YAAY,EAAE,GAC/B,YAAY,EAAE,CAUhB;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,EAAE,CAAC,EAAE,MAAM,EACX,gBAAgB,CAAC,EAAE,YAAY,GAC9B,uBAAuB,EAAE,CAwB3B"}
|
package/lib/bundle/kit-config.js
CHANGED
|
@@ -1,35 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
3
|
+
exports.getCliPlatformBundleConfigs = exports.getTargetPlatforms = void 0;
|
|
7
4
|
const config_1 = require("@rnx-kit/config");
|
|
8
|
-
const
|
|
9
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
10
|
-
/**
|
|
11
|
-
* Get a bundle definition from the kit configuration.
|
|
12
|
-
*
|
|
13
|
-
* @param id Optional bundle definition id. Only needed when the kit config has more than one definition.
|
|
14
|
-
* @returns Bundle definition matching the id (if given), or the first bundle definition found. `undefined` if bundling is disabled or not supported for the kit.
|
|
15
|
-
*/
|
|
16
|
-
function getKitBundleDefinition(id) {
|
|
17
|
-
const kitConfig = (0, config_1.getKitConfig)();
|
|
18
|
-
if (!kitConfig) {
|
|
19
|
-
throw new Error("No kit configuration found for this react-native experience");
|
|
20
|
-
}
|
|
21
|
-
if (kitConfig.bundle === null || kitConfig.bundle === undefined) {
|
|
22
|
-
(0, console_1.warn)(chalk_1.default.yellow("No bundle configuration found for this react-native experience -- skipping bundling"));
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
else if (!kitConfig.bundle) {
|
|
26
|
-
(0, console_1.warn)(chalk_1.default.yellow("Bundling is disabled for this react-native experience -- skipping"));
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
// get the bundle definition
|
|
30
|
-
return (0, config_1.getBundleDefinition)(kitConfig.bundle, id);
|
|
31
|
-
}
|
|
32
|
-
exports.getKitBundleDefinition = getKitBundleDefinition;
|
|
5
|
+
const bundler_plugin_defaults_1 = require("../bundler-plugin-defaults");
|
|
33
6
|
/**
|
|
34
7
|
* Get the list of target platforms for bundling.
|
|
35
8
|
*
|
|
@@ -44,27 +17,45 @@ function getTargetPlatforms(overridePlatform, targetPlatforms) {
|
|
|
44
17
|
if (targetPlatforms && targetPlatforms.length > 0) {
|
|
45
18
|
return targetPlatforms;
|
|
46
19
|
}
|
|
47
|
-
throw new Error("No target platforms given. Update the kit configuration to include a target platform, or provide a target platform on the command-line.");
|
|
20
|
+
throw new Error("No target platforms given. Update the rnx-kit configuration to include a target platform, or provide a target platform on the command-line.");
|
|
48
21
|
}
|
|
49
22
|
exports.getTargetPlatforms = getTargetPlatforms;
|
|
23
|
+
function getDefaultBundleParameters(platform) {
|
|
24
|
+
const extension = platform === "ios" || platform === "macos" ? "jsbundle" : "bundle";
|
|
25
|
+
return {
|
|
26
|
+
entryFile: "index.js",
|
|
27
|
+
bundleOutput: `index.${platform}.${extension}`,
|
|
28
|
+
sourcemapUseAbsolutePath: false,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
50
31
|
/**
|
|
51
|
-
* Get bundle configuration and target platform(s) from kit
|
|
52
|
-
*
|
|
53
|
-
*
|
|
32
|
+
* Get the bundle configuration and target platform(s) from the rnx-kit
|
|
33
|
+
* configuration. Use them to create an array of platform-specific
|
|
34
|
+
* bundle configurations.
|
|
54
35
|
*
|
|
55
|
-
*
|
|
36
|
+
* If an id is given, search for the matching bundle definition. Otherwise, use the first bundle definition.
|
|
37
|
+
*
|
|
38
|
+
* @param id Optional identity of the target bundle definition to return
|
|
56
39
|
* @param overridePlatform Override platform, typically from the command-line. When given, this overrides the list of target platforms.
|
|
57
|
-
* @returns Arrary of
|
|
40
|
+
* @returns Arrary of platform-specific bundle configurations
|
|
58
41
|
*/
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
42
|
+
function getCliPlatformBundleConfigs(id, overridePlatform) {
|
|
43
|
+
const kitConfig = (0, config_1.getKitConfig)();
|
|
44
|
+
const maybeBundleConfig = kitConfig
|
|
45
|
+
? (0, config_1.getBundleConfig)(kitConfig, id)
|
|
46
|
+
: undefined;
|
|
47
|
+
const bundleConfig = maybeBundleConfig !== null && maybeBundleConfig !== void 0 ? maybeBundleConfig : {};
|
|
48
|
+
const platforms = getTargetPlatforms(overridePlatform, bundleConfig.targets);
|
|
65
49
|
return platforms.map((platform) => {
|
|
66
|
-
|
|
50
|
+
const platformBundleConfig = (0, config_1.getPlatformBundleConfig)(bundleConfig, platform);
|
|
51
|
+
// apply defaults to fill in any required props that are missing
|
|
52
|
+
return {
|
|
53
|
+
...(0, bundler_plugin_defaults_1.getDefaultBundlerPlugins)(),
|
|
54
|
+
...getDefaultBundleParameters(platform),
|
|
55
|
+
...platformBundleConfig,
|
|
56
|
+
platform,
|
|
57
|
+
};
|
|
67
58
|
});
|
|
68
59
|
}
|
|
69
|
-
exports.
|
|
60
|
+
exports.getCliPlatformBundleConfigs = getCliPlatformBundleConfigs;
|
|
70
61
|
//# sourceMappingURL=kit-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kit-config.js","sourceRoot":"","sources":["../../src/bundle/kit-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"kit-config.js","sourceRoot":"","sources":["../../src/bundle/kit-config.ts"],"names":[],"mappings":";;;AAAA,4CAIyB;AAGzB,wEAAsE;AAEtE;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,gBAA+B,EAC/B,eAAgC;IAEhC,IAAI,gBAAgB,EAAE;QACpB,OAAO,CAAC,gBAAgB,CAAC,CAAC;KAC3B;IACD,IAAI,eAAe,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;QACjD,OAAO,eAAe,CAAC;KACxB;IACD,MAAM,IAAI,KAAK,CACb,6IAA6I,CAC9I,CAAC;AACJ,CAAC;AAbD,gDAaC;AAED,SAAS,0BAA0B,CAAC,QAAgB;IAClD,MAAM,SAAS,GACb,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC;IAErE,OAAO;QACL,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,SAAS,QAAQ,IAAI,SAAS,EAAE;QAC9C,wBAAwB,EAAE,KAAK;KAChC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,2BAA2B,CACzC,EAAW,EACX,gBAA+B;IAE/B,MAAM,SAAS,GAAG,IAAA,qBAAY,GAAE,CAAC;IACjC,MAAM,iBAAiB,GAAG,SAAS;QACjC,CAAC,CAAC,IAAA,wBAAe,EAAC,SAAS,EAAE,EAAE,CAAC;QAChC,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,YAAY,GAAG,iBAAiB,aAAjB,iBAAiB,cAAjB,iBAAiB,GAAI,EAAE,CAAC;IAE7C,MAAM,SAAS,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAE7E,OAAO,SAAS,CAAC,GAAG,CAA0B,CAAC,QAAQ,EAAE,EAAE;QACzD,MAAM,oBAAoB,GAAG,IAAA,gCAAuB,EAClD,YAAY,EACZ,QAAQ,CACT,CAAC;QAEF,gEAAgE;QAEhE,OAAO;YACL,GAAG,IAAA,kDAAwB,GAAE;YAC7B,GAAG,0BAA0B,CAAC,QAAQ,CAAC;YACvC,GAAG,oBAAoB;YACvB,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AA3BD,kEA2BC"}
|
package/lib/bundle/metro.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { BundleArgs as MetroBundleArgs } from "@rnx-kit/metro-service";
|
|
2
1
|
import type { ConfigT } from "metro-config";
|
|
3
|
-
import type {
|
|
4
|
-
/**
|
|
5
|
-
* Create Metro bundler arguments from a bundle configuration.
|
|
6
|
-
*
|
|
7
|
-
* @param bundleConfig Bundle configuration
|
|
8
|
-
* @returns Metro bundle arguments
|
|
9
|
-
*/
|
|
10
|
-
export declare function createMetroBundleArgs({ entryPath: entryFile, distPath, assetsPath: assetsDest, bundlePrefix, bundleEncoding, sourceMapPath: sourcemapOutput, sourceMapSourceRootPath: sourcemapSourcesRoot, platform, dev, minify, }: BundleConfig): MetroBundleArgs;
|
|
2
|
+
import type { CliPlatformBundleConfig } from "./types";
|
|
11
3
|
/**
|
|
12
4
|
* Run the Metro bundler.
|
|
13
5
|
*
|
|
14
|
-
* @param tsservice TypeScript service to use for type-checking (when enabled)
|
|
15
6
|
* @param metroConfig Metro configuration
|
|
16
7
|
* @param bundleConfig Bundle configuration
|
|
8
|
+
* @param dev Choose whether or not this will be a "developer" bundle. The alternative is a "production" bundle.
|
|
9
|
+
* When `true`, warnings are enabled, and the bundle is not minified by default.
|
|
10
|
+
* Further, optimizations like constant folding are disabled.
|
|
11
|
+
* When `false`, warnings are disabled and the bundle is minified by default.
|
|
12
|
+
* @param minify Optionally choose whether or not the bundle is minified. When not set, minification is controlled by the `dev` property.
|
|
17
13
|
*/
|
|
18
|
-
export declare function metroBundle(metroConfig: ConfigT, bundleConfig:
|
|
14
|
+
export declare function metroBundle(metroConfig: ConfigT, bundleConfig: CliPlatformBundleConfig, dev: boolean, minify?: boolean): Promise<void>;
|
|
19
15
|
//# sourceMappingURL=metro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metro.d.ts","sourceRoot":"","sources":["../../src/bundle/metro.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metro.d.ts","sourceRoot":"","sources":["../../src/bundle/metro.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;GAUG;AACH,wBAAsB,WAAW,CAC/B,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,uBAAuB,EACrC,GAAG,EAAE,OAAO,EACZ,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAyBf"}
|
package/lib/bundle/metro.js
CHANGED
|
@@ -1,78 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
14
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.metroBundle =
|
|
6
|
+
exports.metroBundle = void 0;
|
|
16
7
|
const console_1 = require("@rnx-kit/console");
|
|
17
8
|
const metro_service_1 = require("@rnx-kit/metro-service");
|
|
18
9
|
const fs_1 = require("@rnx-kit/tools-node/fs");
|
|
19
10
|
const path_1 = __importDefault(require("path"));
|
|
20
11
|
const metro_config_1 = require("../metro-config");
|
|
21
|
-
/**
|
|
22
|
-
* Create Metro bundler arguments from a bundle configuration.
|
|
23
|
-
*
|
|
24
|
-
* @param bundleConfig Bundle configuration
|
|
25
|
-
* @returns Metro bundle arguments
|
|
26
|
-
*/
|
|
27
|
-
function createMetroBundleArgs({ entryPath: entryFile, distPath, assetsPath: assetsDest, bundlePrefix, bundleEncoding, sourceMapPath: sourcemapOutput, sourceMapSourceRootPath: sourcemapSourcesRoot, platform, dev, minify, }) {
|
|
28
|
-
// assemble the full path to the bundle file
|
|
29
|
-
const bundleExtension = platform === "ios" || platform === "macos" ? "jsbundle" : "bundle";
|
|
30
|
-
const bundleFile = `${bundlePrefix}.${platform}.${bundleExtension}`;
|
|
31
|
-
const bundlePath = path_1.default.join(distPath, bundleFile);
|
|
32
|
-
// always create a source-map in dev mode
|
|
33
|
-
if (dev) {
|
|
34
|
-
sourcemapOutput = sourcemapOutput !== null && sourcemapOutput !== void 0 ? sourcemapOutput : bundleFile + ".map";
|
|
35
|
-
}
|
|
36
|
-
// use an absolute path for the source map file
|
|
37
|
-
if (sourcemapOutput) {
|
|
38
|
-
sourcemapOutput = path_1.default.join(distPath, sourcemapOutput);
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
assetsDest,
|
|
42
|
-
entryFile,
|
|
43
|
-
minify,
|
|
44
|
-
platform,
|
|
45
|
-
dev,
|
|
46
|
-
bundleOutput: bundlePath,
|
|
47
|
-
bundleEncoding,
|
|
48
|
-
sourcemapOutput,
|
|
49
|
-
sourcemapSourcesRoot,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
exports.createMetroBundleArgs = createMetroBundleArgs;
|
|
53
12
|
/**
|
|
54
13
|
* Run the Metro bundler.
|
|
55
14
|
*
|
|
56
|
-
* @param tsservice TypeScript service to use for type-checking (when enabled)
|
|
57
15
|
* @param metroConfig Metro configuration
|
|
58
16
|
* @param bundleConfig Bundle configuration
|
|
17
|
+
* @param dev Choose whether or not this will be a "developer" bundle. The alternative is a "production" bundle.
|
|
18
|
+
* When `true`, warnings are enabled, and the bundle is not minified by default.
|
|
19
|
+
* Further, optimizations like constant folding are disabled.
|
|
20
|
+
* When `false`, warnings are disabled and the bundle is minified by default.
|
|
21
|
+
* @param minify Optionally choose whether or not the bundle is minified. When not set, minification is controlled by the `dev` property.
|
|
59
22
|
*/
|
|
60
|
-
function metroBundle(metroConfig, bundleConfig) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
23
|
+
async function metroBundle(metroConfig, bundleConfig, dev, minify) {
|
|
24
|
+
(0, console_1.info)(`Bundling ${bundleConfig.platform}...`);
|
|
25
|
+
(0, metro_config_1.customizeMetroConfig)(metroConfig, bundleConfig.detectCyclicDependencies, bundleConfig.detectDuplicateDependencies, bundleConfig.typescriptValidation, bundleConfig.treeShake);
|
|
26
|
+
const metroBundleArgs = {
|
|
27
|
+
...bundleConfig,
|
|
28
|
+
dev,
|
|
29
|
+
minify,
|
|
30
|
+
};
|
|
31
|
+
// ensure all output directories exist
|
|
32
|
+
(0, fs_1.createDirectory)(path_1.default.dirname(metroBundleArgs.bundleOutput));
|
|
33
|
+
metroBundleArgs.sourcemapOutput &&
|
|
34
|
+
(0, fs_1.createDirectory)(path_1.default.dirname(metroBundleArgs.sourcemapOutput));
|
|
35
|
+
metroBundleArgs.assetsDest && (0, fs_1.createDirectory)(metroBundleArgs.assetsDest);
|
|
36
|
+
// create the bundle
|
|
37
|
+
await (0, metro_service_1.bundle)(metroBundleArgs, metroConfig);
|
|
76
38
|
}
|
|
77
39
|
exports.metroBundle = metroBundle;
|
|
78
40
|
//# sourceMappingURL=metro.js.map
|
package/lib/bundle/metro.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metro.js","sourceRoot":"","sources":["../../src/bundle/metro.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metro.js","sourceRoot":"","sources":["../../src/bundle/metro.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAwC;AACxC,0DAA+E;AAC/E,+CAAyD;AAEzD,gDAAwB;AACxB,kDAAuD;AAGvD;;;;;;;;;;GAUG;AACI,KAAK,UAAU,WAAW,CAC/B,WAAoB,EACpB,YAAqC,EACrC,GAAY,EACZ,MAAgB;IAEhB,IAAA,cAAI,EAAC,YAAY,YAAY,CAAC,QAAQ,KAAK,CAAC,CAAC;IAE7C,IAAA,mCAAoB,EAClB,WAAW,EACX,YAAY,CAAC,wBAAwB,EACrC,YAAY,CAAC,2BAA2B,EACxC,YAAY,CAAC,oBAAoB,EACjC,YAAY,CAAC,SAAS,CACvB,CAAC;IAEF,MAAM,eAAe,GAAoB;QACvC,GAAG,YAAY;QACf,GAAG;QACH,MAAM;KACP,CAAC;IAEF,sCAAsC;IACtC,IAAA,oBAAe,EAAC,cAAI,CAAC,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;IAC5D,eAAe,CAAC,eAAe;QAC7B,IAAA,oBAAe,EAAC,cAAI,CAAC,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC,CAAC;IACjE,eAAe,CAAC,UAAU,IAAI,IAAA,oBAAe,EAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAE1E,oBAAoB;IACpB,MAAM,IAAA,sBAAM,EAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC;AA9BD,kCA8BC"}
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
+
import type { TransformProfile } from "metro-babel-transformer";
|
|
1
2
|
import type { BundleArgs } from "@rnx-kit/metro-service";
|
|
2
|
-
import type {
|
|
3
|
-
export declare type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
assetsPath?: string;
|
|
7
|
-
bundlePrefix?: string;
|
|
3
|
+
import type { CliPlatformBundleConfig } from "./types";
|
|
4
|
+
export declare type BundleConfigOverrides = {
|
|
5
|
+
entryFile?: string;
|
|
6
|
+
bundleOutput?: string;
|
|
8
7
|
bundleEncoding?: BundleArgs["bundleEncoding"];
|
|
9
8
|
sourcemapOutput?: string;
|
|
10
9
|
sourcemapSourcesRoot?: string;
|
|
10
|
+
sourcemapUseAbsolutePath?: boolean;
|
|
11
|
+
assetsDest?: string;
|
|
11
12
|
treeShake?: boolean;
|
|
13
|
+
unstableTransformProfile?: TransformProfile;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
|
-
* Apply overrides, if any, to each kit bundle
|
|
16
|
+
* Apply overrides, if any, to each rnx-kit bundle configuration. Overrides are applied in-place.
|
|
15
17
|
*
|
|
16
18
|
* @param overrides Optional overrides to apply
|
|
17
|
-
* @param configs Array of
|
|
19
|
+
* @param configs Array of platform-specific bundle configurations. This is modified if any overrides are applied.
|
|
18
20
|
*/
|
|
19
|
-
export declare function
|
|
21
|
+
export declare function applyBundleConfigOverrides(overrides: BundleConfigOverrides, configs: CliPlatformBundleConfig[]): void;
|
|
20
22
|
//# sourceMappingURL=overrides.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../src/bundle/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../src/bundle/overrides.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,oBAAY,qBAAqB,GAAG;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wBAAwB,CAAC,EAAE,gBAAgB,CAAC;CAC7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,qBAAqB,EAChC,OAAO,EAAE,uBAAuB,EAAE,GACjC,IAAI,CAiBN"}
|
package/lib/bundle/overrides.js
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.applyBundleConfigOverrides = void 0;
|
|
4
4
|
const properties_1 = require("@rnx-kit/tools-language/properties");
|
|
5
5
|
/**
|
|
6
|
-
* Apply overrides, if any, to each kit bundle
|
|
6
|
+
* Apply overrides, if any, to each rnx-kit bundle configuration. Overrides are applied in-place.
|
|
7
7
|
*
|
|
8
8
|
* @param overrides Optional overrides to apply
|
|
9
|
-
* @param configs Array of
|
|
9
|
+
* @param configs Array of platform-specific bundle configurations. This is modified if any overrides are applied.
|
|
10
10
|
*/
|
|
11
|
-
function
|
|
11
|
+
function applyBundleConfigOverrides(overrides, configs) {
|
|
12
12
|
const overridesToApply = (0, properties_1.pickValues)(overrides, [
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"assetsPath",
|
|
16
|
-
"bundlePrefix",
|
|
17
|
-
"bundleEncoding",
|
|
18
|
-
"sourcemapOutput",
|
|
19
|
-
"sourcemapSourcesRoot",
|
|
20
|
-
"treeShake",
|
|
21
|
-
], [
|
|
22
|
-
"entryPath",
|
|
23
|
-
"distPath",
|
|
24
|
-
"assetsPath",
|
|
25
|
-
"bundlePrefix",
|
|
13
|
+
"entryFile",
|
|
14
|
+
"bundleOutput",
|
|
26
15
|
"bundleEncoding",
|
|
27
16
|
"sourcemapOutput",
|
|
28
17
|
"sourcemapSourcesRoot",
|
|
18
|
+
"sourcemapUseAbsolutePath",
|
|
19
|
+
"assetsDest",
|
|
29
20
|
"treeShake",
|
|
21
|
+
"unstableTransformProfile",
|
|
30
22
|
]);
|
|
31
23
|
if (overridesToApply) {
|
|
32
24
|
for (const config of configs) {
|
|
@@ -34,5 +26,5 @@ function applyKitBundleConfigOverrides(overrides, configs) {
|
|
|
34
26
|
}
|
|
35
27
|
}
|
|
36
28
|
}
|
|
37
|
-
exports.
|
|
29
|
+
exports.applyBundleConfigOverrides = applyBundleConfigOverrides;
|
|
38
30
|
//# sourceMappingURL=overrides.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../src/bundle/overrides.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"overrides.js","sourceRoot":"","sources":["../../src/bundle/overrides.ts"],"names":[],"mappings":";;;AAEA,mEAAgE;AAehE;;;;;GAKG;AACH,SAAgB,0BAA0B,CACxC,SAAgC,EAChC,OAAkC;IAElC,MAAM,gBAAgB,GAAG,IAAA,uBAAU,EAAC,SAAS,EAAE;QAC7C,WAAW;QACX,cAAc;QACd,gBAAgB;QAChB,iBAAiB;QACjB,sBAAsB;QACtB,0BAA0B;QAC1B,YAAY;QACZ,WAAW;QACX,0BAA0B;KAC3B,CAAC,CAAC;IACH,IAAI,gBAAgB,EAAE;QACpB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC5B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;SACzC;KACF;AACH,CAAC;AApBD,gEAoBC"}
|
package/lib/bundle/types.d.ts
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TransformProfile } from "metro-babel-transformer";
|
|
2
|
+
import type { BundleParameters } from "@rnx-kit/config";
|
|
2
3
|
import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
|
|
3
|
-
export declare type
|
|
4
|
+
export declare type CliPlatformBundleConfig = BundleParameters & Required<Pick<BundleParameters, "entryFile" | "bundleOutput" | "sourcemapUseAbsolutePath" | "detectCyclicDependencies" | "detectDuplicateDependencies" | "typescriptValidation" | "treeShake">> & {
|
|
5
|
+
unstableTransformProfile?: TransformProfile;
|
|
4
6
|
/**
|
|
5
7
|
* Target platform for the bundle
|
|
6
8
|
*/
|
|
7
9
|
platform: AllPlatforms;
|
|
8
10
|
};
|
|
9
|
-
export declare type BundleConfig = KitBundleConfig & {
|
|
10
|
-
/**
|
|
11
|
-
* Choose whether or not this will be a "developer" bundle. The alternative is a "production" bundle.
|
|
12
|
-
*
|
|
13
|
-
* When `true`, warnings are enabled, and the bundle is not minified by default.
|
|
14
|
-
* Further, optimizations like constant folding are disabled.
|
|
15
|
-
*
|
|
16
|
-
* When `false`, warnings are disabled and the bundle is minified by default.
|
|
17
|
-
*/
|
|
18
|
-
dev: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* Optionally choose whether or not the bundle is minified. When not set, minification is controlled by the `dev` property.
|
|
21
|
-
*/
|
|
22
|
-
minify?: boolean;
|
|
23
|
-
};
|
|
24
11
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/bundle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/bundle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE,oBAAY,uBAAuB,GAAG,gBAAgB,GACpD,QAAQ,CACN,IAAI,CACF,gBAAgB,EACd,WAAW,GACX,cAAc,GACd,0BAA0B,GAC1B,0BAA0B,GAC1B,6BAA6B,GAC7B,sBAAsB,GACtB,WAAW,CACd,CACF,GAAG;IACF,wBAAwB,CAAC,EAAE,gBAAgB,CAAC;IAE5C;;OAEG;IACH,QAAQ,EAAE,YAAY,CAAC;CACxB,CAAC"}
|
package/lib/bundle.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import type { TransformProfile } from "metro-babel-transformer";
|
|
1
2
|
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
3
|
import { BundleArgs } from "@rnx-kit/metro-service";
|
|
3
4
|
import type { AllPlatforms } from "@rnx-kit/tools-react-native/platform";
|
|
4
5
|
export declare type CLIBundleOptions = {
|
|
5
6
|
id?: string;
|
|
7
|
+
entryFile?: string;
|
|
6
8
|
platform?: AllPlatforms;
|
|
7
|
-
entryPath?: string;
|
|
8
|
-
distPath?: string;
|
|
9
|
-
assetsPath?: string;
|
|
10
|
-
bundlePrefix?: string;
|
|
11
|
-
bundleEncoding?: BundleArgs["bundleEncoding"];
|
|
12
9
|
dev: boolean;
|
|
13
10
|
minify?: boolean;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
bundleOutput?: string;
|
|
12
|
+
bundleEncoding?: BundleArgs["bundleEncoding"];
|
|
16
13
|
maxWorkers?: number;
|
|
17
14
|
sourcemapOutput?: string;
|
|
18
15
|
sourcemapSourcesRoot?: string;
|
|
16
|
+
sourcemapUseAbsolutePath?: boolean;
|
|
17
|
+
assetsDest?: string;
|
|
18
|
+
treeShake?: boolean;
|
|
19
|
+
unstableTransformProfile?: TransformProfile;
|
|
19
20
|
resetCache?: boolean;
|
|
20
21
|
config?: string;
|
|
21
22
|
};
|
package/lib/bundle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAmB,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAmB,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAKzE,oBAAY,gBAAgB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wBAAwB,CAAC,EAAE,gBAAgB,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAsB,SAAS,CAC7B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,gBAAgB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
package/lib/bundle.js
CHANGED
|
@@ -1,45 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.rnxBundle = void 0;
|
|
13
4
|
const metro_service_1 = require("@rnx-kit/metro-service");
|
|
14
|
-
const properties_1 = require("@rnx-kit/tools-language/properties");
|
|
15
5
|
const kit_config_1 = require("./bundle/kit-config");
|
|
16
6
|
const metro_1 = require("./bundle/metro");
|
|
17
7
|
const overrides_1 = require("./bundle/overrides");
|
|
18
|
-
function rnxBundle(_argv, cliConfig, cliOptions) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
delete cliOptions.experimentalTreeShake;
|
|
27
|
-
}
|
|
28
|
-
const metroConfig = yield (0, metro_service_1.loadMetroConfig)(cliConfig, cliOptions);
|
|
29
|
-
const kitBundleConfigs = (0, kit_config_1.getKitBundleConfigs)(cliOptions.id, cliOptions.platform);
|
|
30
|
-
if (!kitBundleConfigs) {
|
|
31
|
-
return Promise.resolve();
|
|
32
|
-
}
|
|
33
|
-
(0, overrides_1.applyKitBundleConfigOverrides)(cliOptions, kitBundleConfigs);
|
|
34
|
-
const bundleConfigs = (0, properties_1.extendObjectArray)(kitBundleConfigs, {
|
|
35
|
-
dev: cliOptions.dev,
|
|
36
|
-
minify: cliOptions.minify,
|
|
37
|
-
});
|
|
38
|
-
for (const bundleConfig of bundleConfigs) {
|
|
39
|
-
yield (0, metro_1.metroBundle)(metroConfig, bundleConfig);
|
|
40
|
-
}
|
|
41
|
-
return Promise.resolve();
|
|
42
|
-
});
|
|
8
|
+
async function rnxBundle(_argv, cliConfig, cliOptions) {
|
|
9
|
+
const metroConfig = await (0, metro_service_1.loadMetroConfig)(cliConfig, cliOptions);
|
|
10
|
+
const bundleConfigs = (0, kit_config_1.getCliPlatformBundleConfigs)(cliOptions.id, cliOptions.platform);
|
|
11
|
+
(0, overrides_1.applyBundleConfigOverrides)(cliOptions, bundleConfigs);
|
|
12
|
+
for (const bundleConfig of bundleConfigs) {
|
|
13
|
+
await (0, metro_1.metroBundle)(metroConfig, bundleConfig, cliOptions.dev, cliOptions.minify);
|
|
14
|
+
}
|
|
15
|
+
return Promise.resolve();
|
|
43
16
|
}
|
|
44
17
|
exports.rnxBundle = rnxBundle;
|
|
45
18
|
//# sourceMappingURL=bundle.js.map
|
package/lib/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":";;;AAEA,0DAAqE;AAErE,oDAAkE;AAClE,0CAA6C;AAC7C,kDAAgE;AAqBzD,KAAK,UAAU,SAAS,CAC7B,KAAoB,EACpB,SAAoB,EACpB,UAA4B;IAE5B,MAAM,WAAW,GAAG,MAAM,IAAA,+BAAe,EAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAEjE,MAAM,aAAa,GAAG,IAAA,wCAA2B,EAC/C,UAAU,CAAC,EAAE,EACb,UAAU,CAAC,QAAQ,CACpB,CAAC;IAEF,IAAA,sCAA0B,EAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IAEtD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;QACxC,MAAM,IAAA,mBAAW,EACf,WAAW,EACX,YAAY,EACZ,UAAU,CAAC,GAAG,EACd,UAAU,CAAC,MAAM,CAClB,CAAC;KACH;IAED,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAxBD,8BAwBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler-plugin-defaults.d.ts","sourceRoot":"","sources":["../src/bundler-plugin-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,wBAAgB,wBAAwB,IAAI,QAAQ,CAAC,cAAc,CAAC,CAOnE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDefaultBundlerPlugins = void 0;
|
|
4
|
+
function getDefaultBundlerPlugins() {
|
|
5
|
+
return {
|
|
6
|
+
detectCyclicDependencies: true,
|
|
7
|
+
detectDuplicateDependencies: true,
|
|
8
|
+
typescriptValidation: true,
|
|
9
|
+
treeShake: false,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.getDefaultBundlerPlugins = getDefaultBundlerPlugins;
|
|
13
|
+
//# sourceMappingURL=bundler-plugin-defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler-plugin-defaults.js","sourceRoot":"","sources":["../src/bundler-plugin-defaults.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB;IACtC,OAAO;QACL,wBAAwB,EAAE,IAAI;QAC9B,2BAA2B,EAAE,IAAI;QACjC,oBAAoB,EAAE,IAAI;QAC1B,SAAS,EAAE,KAAK;KACjB,CAAC;AACJ,CAAC;AAPD,4DAOC"}
|