@parcel/packager-js 2.15.0 → 2.15.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/lib/DevPackager.js +1 -1
- package/package.json +8 -8
- package/src/DevPackager.js +4 -1
package/lib/DevPackager.js
CHANGED
|
@@ -112,7 +112,7 @@ class DevPackager {
|
|
|
112
112
|
} else {
|
|
113
113
|
// An external module - map placeholder to original specifier.
|
|
114
114
|
deps[specifier] = dep.specifier;
|
|
115
|
-
if (this.bundle.env.outputFormat === 'esmodule') {
|
|
115
|
+
if (this.bundle.env.outputFormat === 'esmodule' && !dep.isOptional) {
|
|
116
116
|
externals.add(dep.specifier);
|
|
117
117
|
}
|
|
118
118
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-js",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"source": "src/index.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 16.0.0",
|
|
20
|
-
"parcel": "^2.15.
|
|
20
|
+
"parcel": "^2.15.2"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/diagnostic": "2.15.
|
|
24
|
-
"@parcel/plugin": "2.15.
|
|
25
|
-
"@parcel/rust": "2.15.
|
|
23
|
+
"@parcel/diagnostic": "2.15.2",
|
|
24
|
+
"@parcel/plugin": "2.15.2",
|
|
25
|
+
"@parcel/rust": "2.15.2",
|
|
26
26
|
"@parcel/source-map": "^2.1.1",
|
|
27
|
-
"@parcel/types": "2.15.
|
|
28
|
-
"@parcel/utils": "2.15.
|
|
27
|
+
"@parcel/types": "2.15.2",
|
|
28
|
+
"@parcel/utils": "2.15.2",
|
|
29
29
|
"globals": "^13.24.0",
|
|
30
30
|
"nullthrows": "^1.1.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "b66f37168d0e830c030d0427bceac90117674cae"
|
|
33
33
|
}
|
package/src/DevPackager.js
CHANGED
|
@@ -122,7 +122,10 @@ export class DevPackager {
|
|
|
122
122
|
} else {
|
|
123
123
|
// An external module - map placeholder to original specifier.
|
|
124
124
|
deps[specifier] = dep.specifier;
|
|
125
|
-
if (
|
|
125
|
+
if (
|
|
126
|
+
this.bundle.env.outputFormat === 'esmodule' &&
|
|
127
|
+
!dep.isOptional
|
|
128
|
+
) {
|
|
126
129
|
externals.add(dep.specifier);
|
|
127
130
|
}
|
|
128
131
|
}
|