@parcel/packager-js 2.0.0-nightly.1140 → 2.0.0-nightly.1159
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.
|
@@ -714,8 +714,9 @@ ${code}
|
|
|
714
714
|
symbol
|
|
715
715
|
} = this.bundleGraph.getSymbolResolution(resolved, imported, this.bundle);
|
|
716
716
|
|
|
717
|
-
if (resolvedAsset.type !== 'js') {
|
|
718
|
-
// Graceful fallback for non-js imports
|
|
717
|
+
if (resolvedAsset.type !== 'js' || dep && this.bundleGraph.isDependencySkipped(dep)) {
|
|
718
|
+
// Graceful fallback for non-js imports or when trying to resolve a symbol
|
|
719
|
+
// that is actually unused but we still need a placeholder value.
|
|
719
720
|
return '{}';
|
|
720
721
|
}
|
|
721
722
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-js",
|
|
3
|
-
"version": "2.0.0-nightly.
|
|
3
|
+
"version": "2.0.0-nightly.1159+9e2d5d0d6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,16 +17,16 @@
|
|
|
17
17
|
"source": "src/index.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 12.0.0",
|
|
20
|
-
"parcel": "2.0.0-nightly.
|
|
20
|
+
"parcel": "2.0.0-nightly.1157+9e2d5d0d6"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/diagnostic": "2.0.0-nightly.
|
|
24
|
-
"@parcel/hash": "2.
|
|
25
|
-
"@parcel/plugin": "2.0.0-nightly.
|
|
23
|
+
"@parcel/diagnostic": "2.0.0-nightly.1159+9e2d5d0d6",
|
|
24
|
+
"@parcel/hash": "2.7.1-nightly.2782+9e2d5d0d6",
|
|
25
|
+
"@parcel/plugin": "2.0.0-nightly.1159+9e2d5d0d6",
|
|
26
26
|
"@parcel/source-map": "^2.0.0",
|
|
27
|
-
"@parcel/utils": "2.0.0-nightly.
|
|
27
|
+
"@parcel/utils": "2.0.0-nightly.1159+9e2d5d0d6",
|
|
28
28
|
"globals": "^13.2.0",
|
|
29
29
|
"nullthrows": "^1.1.1"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "9e2d5d0d60d08d65b5ae6cd765c907a8753bbf39"
|
|
32
32
|
}
|
|
@@ -763,10 +763,16 @@ ${code}
|
|
|
763
763
|
exportSymbol,
|
|
764
764
|
symbol,
|
|
765
765
|
} = this.bundleGraph.getSymbolResolution(resolved, imported, this.bundle);
|
|
766
|
-
|
|
767
|
-
|
|
766
|
+
|
|
767
|
+
if (
|
|
768
|
+
resolvedAsset.type !== 'js' ||
|
|
769
|
+
(dep && this.bundleGraph.isDependencySkipped(dep))
|
|
770
|
+
) {
|
|
771
|
+
// Graceful fallback for non-js imports or when trying to resolve a symbol
|
|
772
|
+
// that is actually unused but we still need a placeholder value.
|
|
768
773
|
return '{}';
|
|
769
774
|
}
|
|
775
|
+
|
|
770
776
|
let isWrapped =
|
|
771
777
|
!this.bundle.hasAsset(resolvedAsset) ||
|
|
772
778
|
(this.wrappedAssets.has(resolvedAsset.id) &&
|