@parcel/packager-react-static 2.14.3-canary.3428 → 2.14.4

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.
@@ -120,7 +120,8 @@ var _default = exports.default = new (_plugin().Packager)({
120
120
  bundle,
121
121
  bundleGraph,
122
122
  getInlineBundleContents,
123
- config
123
+ config,
124
+ options
124
125
  }) {
125
126
  if (bundle.env.shouldScopeHoist) {
126
127
  throw new Error('Scope hoisting is not supported with SSG');
@@ -132,6 +133,8 @@ var _default = exports.default = new (_plugin().Packager)({
132
133
  load,
133
134
  loadModule
134
135
  } = await loadBundle(bundle, bundleGraph, getInlineBundleContents);
136
+ let env = process.env.NODE_ENV;
137
+ process.env.NODE_ENV = options.env.NODE_ENV;
135
138
  let Component = load((0, _nullthrows().default)(bundle.getMainEntry()).id).default;
136
139
  let {
137
140
  renderToReadableStream
@@ -143,6 +146,7 @@ var _default = exports.default = new (_plugin().Packager)({
143
146
  let {
144
147
  createFromReadableStream
145
148
  } = loadModule('react-server-dom-parcel/client.edge', __filename, 'react-client');
149
+ process.env.NODE_ENV = env;
146
150
  let {
147
151
  injectRSCPayload
148
152
  } = await import('rsc-html-stream/server');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/packager-react-static",
3
- "version": "2.14.3-canary.3428+c2afb4ba8",
3
+ "version": "2.14.4",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -17,16 +17,16 @@
17
17
  "source": "src/ReactStaticPackager.js",
18
18
  "engines": {
19
19
  "node": ">= 16.0.0",
20
- "parcel": "^2.0.0-canary.1803+c2afb4ba8"
20
+ "parcel": "^2.14.4"
21
21
  },
22
22
  "dependencies": {
23
- "@parcel/node-resolver-core": "3.5.3-canary.3428+c2afb4ba8",
24
- "@parcel/plugin": "2.0.0-canary.1805+c2afb4ba8",
25
- "@parcel/rust": "2.14.3-canary.3428+c2afb4ba8",
26
- "@parcel/types": "2.0.0-canary.1805+c2afb4ba8",
27
- "@parcel/utils": "2.0.0-canary.1805+c2afb4ba8",
23
+ "@parcel/node-resolver-core": "3.5.4",
24
+ "@parcel/plugin": "2.14.4",
25
+ "@parcel/rust": "2.14.4",
26
+ "@parcel/types": "2.14.4",
27
+ "@parcel/utils": "2.14.4",
28
28
  "nullthrows": "^1.1.1",
29
- "rsc-html-stream": "^0.0.4"
29
+ "rsc-html-stream": "^0.0.5"
30
30
  },
31
- "gitHead": "c2afb4ba81bfcfc0455c0f4f6c36b0a8c3ead9c0"
31
+ "gitHead": "c09fee751b61e2f9d52164f88248b9c668614134"
32
32
  }
@@ -76,7 +76,13 @@ export default (new Packager({
76
76
  parcelRequireName: 'parcelRequire' + hashString(name).slice(-4),
77
77
  };
78
78
  },
79
- async package({bundle, bundleGraph, getInlineBundleContents, config}) {
79
+ async package({
80
+ bundle,
81
+ bundleGraph,
82
+ getInlineBundleContents,
83
+ config,
84
+ options,
85
+ }) {
80
86
  if (bundle.env.shouldScopeHoist) {
81
87
  throw new Error('Scope hoisting is not supported with SSG');
82
88
  }
@@ -90,6 +96,8 @@ export default (new Packager({
90
96
  getInlineBundleContents,
91
97
  );
92
98
 
99
+ let env = process.env.NODE_ENV;
100
+ process.env.NODE_ENV = options.env.NODE_ENV;
93
101
  let Component = load(nullthrows(bundle.getMainEntry()).id).default;
94
102
  let {renderToReadableStream} = loadModule(
95
103
  'react-server-dom-parcel/server.edge',
@@ -107,6 +115,7 @@ export default (new Packager({
107
115
  __filename,
108
116
  'react-client',
109
117
  );
118
+ process.env.NODE_ENV = env;
110
119
  let {injectRSCPayload} = await import('rsc-html-stream/server');
111
120
 
112
121
  let pages: Page[] = [];