@atlaspack/reporter-conditional-manifest 2.12.1-dev.3450 → 2.12.1-dev.3478
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/reporter-conditional-manifest",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3478+5fd2da535",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"source": "src/ConditionalManifestReporter.js",
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">= 16.0.0",
|
|
16
|
-
"parcel": "^2.12.1-dev.
|
|
16
|
+
"parcel": "^2.12.1-dev.3478+5fd2da535"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/plugin": "2.12.1-dev.
|
|
19
|
+
"@atlaspack/plugin": "2.12.1-dev.3478+5fd2da535",
|
|
20
20
|
"nullthrows": "^1.1.1"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "5fd2da535ecbe096d57e03aec15e80bb1d7601f7"
|
|
23
23
|
}
|
|
@@ -9,8 +9,10 @@ export default (new Reporter({
|
|
|
9
9
|
const bundles = event.bundleGraph.getConditionalBundleMapping();
|
|
10
10
|
|
|
11
11
|
// Replace bundles with file paths
|
|
12
|
-
const mapBundles = bundles =>
|
|
13
|
-
bundles.map(bundle =>
|
|
12
|
+
const mapBundles = (bundles) =>
|
|
13
|
+
bundles.map((bundle) =>
|
|
14
|
+
relative(bundle.target.distDir, bundle.filePath),
|
|
15
|
+
);
|
|
14
16
|
|
|
15
17
|
const manifest = {};
|
|
16
18
|
for (const [bundle, conditions] of bundles.entries()) {
|
|
@@ -29,7 +31,7 @@ export default (new Reporter({
|
|
|
29
31
|
|
|
30
32
|
// Error if there are multiple targets in the build
|
|
31
33
|
const targets = new Set(
|
|
32
|
-
event.bundleGraph.getBundles().map(bundle => bundle.target),
|
|
34
|
+
event.bundleGraph.getBundles().map((bundle) => bundle.target),
|
|
33
35
|
);
|
|
34
36
|
if (targets.size > 1) {
|
|
35
37
|
throw new Error(
|