@parcel/packager-js 2.15.0 → 2.15.1

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.
@@ -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.0",
3
+ "version": "2.15.1",
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.0"
20
+ "parcel": "^2.15.1"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/diagnostic": "2.15.0",
24
- "@parcel/plugin": "2.15.0",
25
- "@parcel/rust": "2.15.0",
23
+ "@parcel/diagnostic": "2.15.1",
24
+ "@parcel/plugin": "2.15.1",
25
+ "@parcel/rust": "2.15.1",
26
26
  "@parcel/source-map": "^2.1.1",
27
- "@parcel/types": "2.15.0",
28
- "@parcel/utils": "2.15.0",
27
+ "@parcel/types": "2.15.1",
28
+ "@parcel/utils": "2.15.1",
29
29
  "globals": "^13.24.0",
30
30
  "nullthrows": "^1.1.1"
31
31
  },
32
- "gitHead": "99ada2e5258f6d4a2c6cdc366c12e4161b0161e6"
32
+ "gitHead": "6a9fd4c67355d7b00eba32b73346f88ee766220b"
33
33
  }
@@ -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 (this.bundle.env.outputFormat === 'esmodule') {
125
+ if (
126
+ this.bundle.env.outputFormat === 'esmodule' &&
127
+ !dep.isOptional
128
+ ) {
126
129
  externals.add(dep.specifier);
127
130
  }
128
131
  }