@atlaspack/reporter-conditional-manifest 2.14.1-dev.9 → 2.14.1-dev.91
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.
|
@@ -30,17 +30,18 @@ async function report({
|
|
|
30
30
|
// Replace bundles with file paths
|
|
31
31
|
const mapBundles = bundles => bundles.map(bundle => (0, _path().relative)(bundle.target.distDir, bundle.filePath));
|
|
32
32
|
const manifest = {};
|
|
33
|
-
for (const
|
|
33
|
+
for (const conditions of bundles.values()) {
|
|
34
34
|
const bundleInfo = {};
|
|
35
35
|
for (const [key, cond] of conditions) {
|
|
36
|
+
const bundle = cond.bundle;
|
|
36
37
|
bundleInfo[key] = {
|
|
37
38
|
// Reverse bundles so we load children bundles first
|
|
38
39
|
ifTrueBundles: mapBundles(cond.ifTrueBundles).reverse(),
|
|
39
40
|
ifFalseBundles: mapBundles(cond.ifFalseBundles).reverse()
|
|
40
41
|
};
|
|
42
|
+
manifest[bundle.target.name] ??= {};
|
|
43
|
+
manifest[bundle.target.name][(0, _path().relative)(bundle.target.distDir, bundle.filePath)] = bundleInfo;
|
|
41
44
|
}
|
|
42
|
-
manifest[bundle.target.name] ??= {};
|
|
43
|
-
manifest[bundle.target.name][(0, _path().relative)(bundle.target.distDir, bundle.filePath)] = bundleInfo;
|
|
44
45
|
}
|
|
45
46
|
const targets = new Set(event.bundleGraph.getBundles().map(bundle => bundle.target));
|
|
46
47
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-conditional-manifest",
|
|
3
|
-
"version": "2.14.1-dev.
|
|
3
|
+
"version": "2.14.1-dev.91+08020e0e1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,13 +12,12 @@
|
|
|
12
12
|
"main": "lib/ConditionalManifestReporter.js",
|
|
13
13
|
"source": "src/ConditionalManifestReporter.js",
|
|
14
14
|
"engines": {
|
|
15
|
-
"atlaspack": "^2.14.1-dev.9+6d1d32abe",
|
|
16
15
|
"node": ">= 16.0.0"
|
|
17
16
|
},
|
|
18
17
|
"dependencies": {
|
|
19
|
-
"@atlaspack/plugin": "2.14.1-dev.
|
|
18
|
+
"@atlaspack/plugin": "2.14.1-dev.91+08020e0e1",
|
|
20
19
|
"nullthrows": "^1.1.1"
|
|
21
20
|
},
|
|
22
21
|
"type": "commonjs",
|
|
23
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "08020e0e18819f3e15e74726f9ffa697892f7bfa"
|
|
24
23
|
}
|
|
@@ -28,20 +28,20 @@ async function report({
|
|
|
28
28
|
bundles.map((bundle) => relative(bundle.target.distDir, bundle.filePath));
|
|
29
29
|
|
|
30
30
|
const manifest = {};
|
|
31
|
-
for (const
|
|
31
|
+
for (const conditions of bundles.values()) {
|
|
32
32
|
const bundleInfo = {};
|
|
33
33
|
for (const [key, cond] of conditions) {
|
|
34
|
+
const bundle = cond.bundle;
|
|
34
35
|
bundleInfo[key] = {
|
|
35
36
|
// Reverse bundles so we load children bundles first
|
|
36
37
|
ifTrueBundles: mapBundles(cond.ifTrueBundles).reverse(),
|
|
37
38
|
ifFalseBundles: mapBundles(cond.ifFalseBundles).reverse(),
|
|
38
39
|
};
|
|
40
|
+
manifest[bundle.target.name] ??= {};
|
|
41
|
+
manifest[bundle.target.name][
|
|
42
|
+
relative(bundle.target.distDir, bundle.filePath)
|
|
43
|
+
] = bundleInfo;
|
|
39
44
|
}
|
|
40
|
-
|
|
41
|
-
manifest[bundle.target.name] ??= {};
|
|
42
|
-
manifest[bundle.target.name][
|
|
43
|
-
relative(bundle.target.distDir, bundle.filePath)
|
|
44
|
-
] = bundleInfo;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
const targets = new Set(
|