@parcel/packager-react-static 2.13.4-canary.3392 → 2.13.4-canary.3395
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/ReactStaticPackager.js +90 -19
- package/package.json +8 -7
- package/src/ReactStaticPackager.js +107 -14
|
@@ -67,14 +67,29 @@ function _stream() {
|
|
|
67
67
|
};
|
|
68
68
|
return data;
|
|
69
69
|
}
|
|
70
|
+
function _rust() {
|
|
71
|
+
const data = require("@parcel/rust");
|
|
72
|
+
_rust = function () {
|
|
73
|
+
return data;
|
|
74
|
+
};
|
|
75
|
+
return data;
|
|
76
|
+
}
|
|
77
|
+
function _nodeAsync_hooks() {
|
|
78
|
+
const data = require("node:async_hooks");
|
|
79
|
+
_nodeAsync_hooks = function () {
|
|
80
|
+
return data;
|
|
81
|
+
};
|
|
82
|
+
return data;
|
|
83
|
+
}
|
|
70
84
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
85
|
+
// $FlowFixMe
|
|
71
86
|
let clientResolver;
|
|
72
87
|
let serverResolver;
|
|
73
88
|
let packagingBundles = new Map();
|
|
74
89
|
let moduleCache = new Map();
|
|
75
90
|
let loadedBundles = new Map();
|
|
76
91
|
var _default = exports.default = new (_plugin().Packager)({
|
|
77
|
-
loadConfig({
|
|
92
|
+
async loadConfig({
|
|
78
93
|
options,
|
|
79
94
|
config
|
|
80
95
|
}) {
|
|
@@ -91,15 +106,28 @@ var _default = exports.default = new (_plugin().Packager)({
|
|
|
91
106
|
packageExports: true,
|
|
92
107
|
conditions: 1 << 16 // "react-server"
|
|
93
108
|
});
|
|
109
|
+
|
|
110
|
+
// This logic must be synced with the packager...
|
|
111
|
+
let packageName = await config.getConfigFrom(options.projectRoot + '/index', [], {
|
|
112
|
+
packageKey: 'name'
|
|
113
|
+
});
|
|
114
|
+
let name = (packageName === null || packageName === void 0 ? void 0 : packageName.contents) ?? '';
|
|
115
|
+
return {
|
|
116
|
+
parcelRequireName: 'parcelRequire' + (0, _rust().hashString)(name).slice(-4)
|
|
117
|
+
};
|
|
94
118
|
},
|
|
95
119
|
async package({
|
|
96
120
|
bundle,
|
|
97
121
|
bundleGraph,
|
|
98
|
-
getInlineBundleContents
|
|
122
|
+
getInlineBundleContents,
|
|
123
|
+
config
|
|
99
124
|
}) {
|
|
100
125
|
if (bundle.env.shouldScopeHoist) {
|
|
101
126
|
throw new Error('Scope hoisting is not supported with SSG');
|
|
102
127
|
}
|
|
128
|
+
|
|
129
|
+
// $FlowFixMe
|
|
130
|
+
globalThis.AsyncLocalStorage ??= _nodeAsync_hooks().AsyncLocalStorage;
|
|
103
131
|
let {
|
|
104
132
|
load,
|
|
105
133
|
loadModule
|
|
@@ -137,15 +165,52 @@ var _default = exports.default = new (_plugin().Packager)({
|
|
|
137
165
|
meta: pageMeta((0, _nullthrows().default)(bundle.getMainEntry()).meta)
|
|
138
166
|
}
|
|
139
167
|
};
|
|
140
|
-
let
|
|
168
|
+
let resources = [];
|
|
169
|
+
let bootstrapModules = [];
|
|
170
|
+
let entry;
|
|
171
|
+
for (let b of bundleGraph.getReferencedBundles(bundle, {
|
|
172
|
+
includeInline: false
|
|
173
|
+
})) {
|
|
174
|
+
if (b.type === 'css') {
|
|
175
|
+
resources.push(React.createElement('link', {
|
|
176
|
+
rel: 'stylesheet',
|
|
177
|
+
href: (0, _utils().urlJoin)(b.target.publicUrl, b.name),
|
|
178
|
+
precedence: 'default'
|
|
179
|
+
}));
|
|
180
|
+
} else if (b.type === 'js' && b.env.isBrowser()) {
|
|
181
|
+
bootstrapModules.push((0, _utils().urlJoin)(b.target.publicUrl, b.name));
|
|
182
|
+
resources.push(React.createElement('script', {
|
|
183
|
+
type: 'module',
|
|
184
|
+
async: true,
|
|
185
|
+
src: (0, _utils().urlJoin)(b.target.publicUrl, b.name)
|
|
186
|
+
}));
|
|
187
|
+
if (!entry) {
|
|
188
|
+
b.traverseAssets((a, ctx, actions) => {
|
|
189
|
+
if (Array.isArray(a.meta.directives) && a.meta.directives.includes('use client-entry')) {
|
|
190
|
+
entry = a;
|
|
191
|
+
actions.stop();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
let stream = renderToReadableStream([...resources, React.createElement(Component, props)]);
|
|
141
198
|
let [s1, renderStream] = stream.tee();
|
|
142
199
|
let [injectStream, rscStream] = s1.tee();
|
|
143
|
-
let data
|
|
200
|
+
let data;
|
|
201
|
+
function Content() {
|
|
202
|
+
data ??= createFromReadableStream(renderStream);
|
|
203
|
+
return React.use(data);
|
|
204
|
+
}
|
|
205
|
+
let bootstrapScriptContent;
|
|
206
|
+
if (entry) {
|
|
207
|
+
bootstrapScriptContent = `Promise.all([${bootstrapModules.map(m => `import("${m}")`).join(',')}]).then(()=>${(0, _nullthrows().default)(config).parcelRequireName}(${JSON.stringify(bundleGraph.getAssetPublicId(entry))}))`;
|
|
208
|
+
}
|
|
144
209
|
let {
|
|
145
210
|
prelude
|
|
146
|
-
} = await prerender(React.createElement(
|
|
147
|
-
|
|
148
|
-
})
|
|
211
|
+
} = await prerender(React.createElement(Content), {
|
|
212
|
+
bootstrapScriptContent
|
|
213
|
+
});
|
|
149
214
|
let response = prelude.pipeThrough(injectRSCPayload(injectStream));
|
|
150
215
|
return [{
|
|
151
216
|
type: 'html',
|
|
@@ -181,15 +246,22 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
181
246
|
let packagedBundle = await (0, _nullthrows().default)(packagingBundles.get(entryBundle));
|
|
182
247
|
let contents = await (0, _utils().blobToString)(packagedBundle.contents);
|
|
183
248
|
contents = `module.exports = ${contents}`;
|
|
184
|
-
return [entryBundle.id, [(0, _nullthrows().default)(entryBundle.getMainEntry()), contents]];
|
|
249
|
+
return [[entryBundle.id, [(0, _nullthrows().default)(entryBundle.getMainEntry()), contents]]];
|
|
250
|
+
});
|
|
251
|
+
} else if (entryBundle) {
|
|
252
|
+
queue.add(async () => {
|
|
253
|
+
let {
|
|
254
|
+
assets: subAssets
|
|
255
|
+
} = await loadBundle(entryBundle, bundleGraph, getInlineBundleContents);
|
|
256
|
+
return Array.from(subAssets);
|
|
185
257
|
});
|
|
186
258
|
}
|
|
187
259
|
} else if (node.type === 'asset') {
|
|
188
260
|
let asset = node.value;
|
|
189
|
-
queue.add(async () => [asset.id, [asset, await asset.getCode()]]);
|
|
261
|
+
queue.add(async () => [[asset.id, [asset, await asset.getCode()]]]);
|
|
190
262
|
}
|
|
191
263
|
});
|
|
192
|
-
let assets = new Map(await queue.run());
|
|
264
|
+
let assets = new Map((await queue.run()).flatMap(v => v));
|
|
193
265
|
let assetsByFilePath = new Map();
|
|
194
266
|
let assetsByPublicId = new Map();
|
|
195
267
|
for (let [asset] of assets.values()) {
|
|
@@ -251,24 +323,23 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
251
323
|
if (resolution !== null && resolution !== void 0 && resolution.specifier) {
|
|
252
324
|
id = resolution.specifier;
|
|
253
325
|
}
|
|
326
|
+
if (id.startsWith('.')) {
|
|
327
|
+
// Another bundle. Should already be loaded.
|
|
328
|
+
return {};
|
|
329
|
+
}
|
|
254
330
|
return defaultRequire(id);
|
|
255
331
|
};
|
|
256
|
-
|
|
257
|
-
// @ts-ignore
|
|
258
332
|
require.resolve = defaultRequire.resolve;
|
|
259
333
|
return runModule(code, asset.filePath, cacheKey, require, parcelRequire);
|
|
260
334
|
};
|
|
261
335
|
let parcelRequire = publicId => {
|
|
262
336
|
return loadAsset((0, _nullthrows().default)(assetsByPublicId.get(publicId)));
|
|
263
337
|
};
|
|
264
|
-
|
|
265
|
-
// @ts-ignore
|
|
338
|
+
parcelRequire.root = parcelRequire;
|
|
266
339
|
parcelRequire.meta = {
|
|
267
340
|
distDir: bundle.target.distDir,
|
|
268
341
|
publicUrl: bundle.target.publicUrl
|
|
269
342
|
};
|
|
270
|
-
|
|
271
|
-
// @ts-ignore
|
|
272
343
|
parcelRequire.load = async filePath => {
|
|
273
344
|
let bundle = bundleGraph.getBundles().find(b => b.name === filePath);
|
|
274
345
|
if (bundle) {
|
|
@@ -317,8 +388,6 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
317
388
|
let require = id => {
|
|
318
389
|
return loadModule(id, filePath, env);
|
|
319
390
|
};
|
|
320
|
-
|
|
321
|
-
// @ts-ignore
|
|
322
391
|
require.resolve = defaultRequire.resolve;
|
|
323
392
|
return runModule(code, filePath, cacheKey, require, parcelRequire);
|
|
324
393
|
}
|
|
@@ -331,6 +400,7 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
331
400
|
};
|
|
332
401
|
}
|
|
333
402
|
function runModule(code, filename, id, require, parcelRequire) {
|
|
403
|
+
// code = code.replace(/import\((['"].*?['"])\)/g, (_, m) => `parcelRequire.load(${m[0] + m.slice(3)})`);
|
|
334
404
|
let moduleFunction = _vm().default.compileFunction(code, ['exports', 'require', 'module', '__dirname', '__filename', 'parcelRequire'], {
|
|
335
405
|
filename
|
|
336
406
|
});
|
|
@@ -341,7 +411,8 @@ function runModule(code, filename, id, require, parcelRequire) {
|
|
|
341
411
|
children: [],
|
|
342
412
|
filename,
|
|
343
413
|
id,
|
|
344
|
-
path: dirname
|
|
414
|
+
path: dirname,
|
|
415
|
+
bundle: parcelRequire
|
|
345
416
|
};
|
|
346
417
|
moduleCache.set(id, module);
|
|
347
418
|
moduleFunction(module.exports, require, module, dirname, filename, parcelRequire);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-react-static",
|
|
3
|
-
"version": "2.13.4-canary.
|
|
3
|
+
"version": "2.13.4-canary.3395+f86f5f27c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,15 +17,16 @@
|
|
|
17
17
|
"source": "src/ReactStaticPackager.js",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">= 16.0.0",
|
|
20
|
-
"parcel": "^2.0.0-canary.
|
|
20
|
+
"parcel": "^2.0.0-canary.1770+f86f5f27c"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/node-resolver-core": "3.4.4-canary.
|
|
24
|
-
"@parcel/plugin": "2.0.0-canary.
|
|
25
|
-
"@parcel/
|
|
26
|
-
"@parcel/
|
|
23
|
+
"@parcel/node-resolver-core": "3.4.4-canary.3395+f86f5f27c",
|
|
24
|
+
"@parcel/plugin": "2.0.0-canary.1772+f86f5f27c",
|
|
25
|
+
"@parcel/rust": "2.13.4-canary.3395+f86f5f27c",
|
|
26
|
+
"@parcel/types": "2.0.0-canary.1772+f86f5f27c",
|
|
27
|
+
"@parcel/utils": "2.0.0-canary.1772+f86f5f27c",
|
|
27
28
|
"nullthrows": "^1.1.1",
|
|
28
29
|
"rsc-html-stream": "^0.0.4"
|
|
29
30
|
},
|
|
30
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "f86f5f27c3a6553e70bd35652f19e6ab8d8e4e4a"
|
|
31
32
|
}
|
|
@@ -18,6 +18,9 @@ import {ResolverBase} from '@parcel/node-resolver-core';
|
|
|
18
18
|
import vm from 'vm';
|
|
19
19
|
import nullthrows from 'nullthrows';
|
|
20
20
|
import {Readable} from 'stream';
|
|
21
|
+
import {hashString} from '@parcel/rust';
|
|
22
|
+
// $FlowFixMe
|
|
23
|
+
import {AsyncLocalStorage} from 'node:async_hooks';
|
|
21
24
|
|
|
22
25
|
export interface Page {
|
|
23
26
|
url: string;
|
|
@@ -45,7 +48,7 @@ let moduleCache = new Map<string, ParcelModule>();
|
|
|
45
48
|
let loadedBundles = new Map<NamedBundle, any>();
|
|
46
49
|
|
|
47
50
|
export default (new Packager({
|
|
48
|
-
loadConfig({options, config}) {
|
|
51
|
+
async loadConfig({options, config}) {
|
|
49
52
|
config.invalidateOnBuild();
|
|
50
53
|
packagingBundles.clear();
|
|
51
54
|
moduleCache.clear();
|
|
@@ -60,12 +63,29 @@ export default (new Packager({
|
|
|
60
63
|
packageExports: true,
|
|
61
64
|
conditions: 1 << 16, // "react-server"
|
|
62
65
|
});
|
|
66
|
+
|
|
67
|
+
// This logic must be synced with the packager...
|
|
68
|
+
let packageName = await config.getConfigFrom(
|
|
69
|
+
options.projectRoot + '/index',
|
|
70
|
+
[],
|
|
71
|
+
{
|
|
72
|
+
packageKey: 'name',
|
|
73
|
+
},
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
let name = packageName?.contents ?? '';
|
|
77
|
+
return {
|
|
78
|
+
parcelRequireName: 'parcelRequire' + hashString(name).slice(-4),
|
|
79
|
+
};
|
|
63
80
|
},
|
|
64
|
-
async package({bundle, bundleGraph, getInlineBundleContents}) {
|
|
81
|
+
async package({bundle, bundleGraph, getInlineBundleContents, config}) {
|
|
65
82
|
if (bundle.env.shouldScopeHoist) {
|
|
66
83
|
throw new Error('Scope hoisting is not supported with SSG');
|
|
67
84
|
}
|
|
68
85
|
|
|
86
|
+
// $FlowFixMe
|
|
87
|
+
globalThis.AsyncLocalStorage ??= AsyncLocalStorage;
|
|
88
|
+
|
|
69
89
|
let {load, loadModule} = await loadBundle(
|
|
70
90
|
bundle,
|
|
71
91
|
bundleGraph,
|
|
@@ -112,15 +132,68 @@ export default (new Packager({
|
|
|
112
132
|
},
|
|
113
133
|
};
|
|
114
134
|
|
|
115
|
-
let
|
|
135
|
+
let resources = [];
|
|
136
|
+
let bootstrapModules = [];
|
|
137
|
+
let entry;
|
|
138
|
+
for (let b of bundleGraph.getReferencedBundles(bundle, {
|
|
139
|
+
includeInline: false,
|
|
140
|
+
})) {
|
|
141
|
+
if (b.type === 'css') {
|
|
142
|
+
resources.push(
|
|
143
|
+
React.createElement('link', {
|
|
144
|
+
rel: 'stylesheet',
|
|
145
|
+
href: urlJoin(b.target.publicUrl, b.name),
|
|
146
|
+
precedence: 'default',
|
|
147
|
+
}),
|
|
148
|
+
);
|
|
149
|
+
} else if (b.type === 'js' && b.env.isBrowser()) {
|
|
150
|
+
bootstrapModules.push(urlJoin(b.target.publicUrl, b.name));
|
|
151
|
+
resources.push(
|
|
152
|
+
React.createElement('script', {
|
|
153
|
+
type: 'module',
|
|
154
|
+
async: true,
|
|
155
|
+
src: urlJoin(b.target.publicUrl, b.name),
|
|
156
|
+
}),
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
if (!entry) {
|
|
160
|
+
b.traverseAssets((a, ctx, actions) => {
|
|
161
|
+
if (
|
|
162
|
+
Array.isArray(a.meta.directives) &&
|
|
163
|
+
a.meta.directives.includes('use client-entry')
|
|
164
|
+
) {
|
|
165
|
+
entry = a;
|
|
166
|
+
actions.stop();
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
let stream = renderToReadableStream([
|
|
174
|
+
...resources,
|
|
175
|
+
React.createElement(Component, props),
|
|
176
|
+
]);
|
|
116
177
|
let [s1, renderStream] = stream.tee();
|
|
117
178
|
let [injectStream, rscStream] = s1.tee();
|
|
118
|
-
let data
|
|
179
|
+
let data;
|
|
119
180
|
function Content() {
|
|
181
|
+
data ??= createFromReadableStream(renderStream);
|
|
120
182
|
return React.use(data);
|
|
121
183
|
}
|
|
122
184
|
|
|
123
|
-
let
|
|
185
|
+
let bootstrapScriptContent;
|
|
186
|
+
if (entry) {
|
|
187
|
+
bootstrapScriptContent = `Promise.all([${bootstrapModules
|
|
188
|
+
.map(m => `import("${m}")`)
|
|
189
|
+
.join(',')}]).then(()=>${
|
|
190
|
+
nullthrows(config).parcelRequireName
|
|
191
|
+
}(${JSON.stringify(bundleGraph.getAssetPublicId(entry))}))`;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
let {prelude} = await prerender(React.createElement(Content), {
|
|
195
|
+
bootstrapScriptContent,
|
|
196
|
+
});
|
|
124
197
|
let response = prelude.pipeThrough(injectRSCPayload(injectStream));
|
|
125
198
|
|
|
126
199
|
return [
|
|
@@ -162,7 +235,9 @@ async function loadBundleUncached(
|
|
|
162
235
|
) => Async<{|contents: Blob|}>,
|
|
163
236
|
) {
|
|
164
237
|
// Load all asset contents.
|
|
165
|
-
let queue = new PromiseQueue({
|
|
238
|
+
let queue = new PromiseQueue<Array<[string, [Asset, string]]>>({
|
|
239
|
+
maxConcurrent: 32,
|
|
240
|
+
});
|
|
166
241
|
bundle.traverse(node => {
|
|
167
242
|
if (node.type === 'dependency') {
|
|
168
243
|
let dep = node.value;
|
|
@@ -182,18 +257,31 @@ async function loadBundleUncached(
|
|
|
182
257
|
let contents = await blobToString(packagedBundle.contents);
|
|
183
258
|
contents = `module.exports = ${contents}`;
|
|
184
259
|
return [
|
|
185
|
-
|
|
186
|
-
|
|
260
|
+
[
|
|
261
|
+
entryBundle.id,
|
|
262
|
+
[nullthrows(entryBundle.getMainEntry()), contents],
|
|
263
|
+
],
|
|
187
264
|
];
|
|
188
265
|
});
|
|
266
|
+
} else if (entryBundle) {
|
|
267
|
+
queue.add(async () => {
|
|
268
|
+
let {assets: subAssets} = await loadBundle(
|
|
269
|
+
entryBundle,
|
|
270
|
+
bundleGraph,
|
|
271
|
+
getInlineBundleContents,
|
|
272
|
+
);
|
|
273
|
+
return Array.from(subAssets);
|
|
274
|
+
});
|
|
189
275
|
}
|
|
190
276
|
} else if (node.type === 'asset') {
|
|
191
277
|
let asset = node.value;
|
|
192
|
-
queue.add(async () => [asset.id, [asset, await asset.getCode()]]);
|
|
278
|
+
queue.add(async () => [[asset.id, [asset, await asset.getCode()]]]);
|
|
193
279
|
}
|
|
194
280
|
});
|
|
195
281
|
|
|
196
|
-
let assets = new Map<string, [Asset, string]>(
|
|
282
|
+
let assets = new Map<string, [Asset, string]>(
|
|
283
|
+
(await queue.run()).flatMap(v => v),
|
|
284
|
+
);
|
|
197
285
|
let assetsByFilePath = new Map<string, string>();
|
|
198
286
|
let assetsByPublicId = new Map<string, string>();
|
|
199
287
|
for (let [asset] of assets.values()) {
|
|
@@ -251,10 +339,14 @@ async function loadBundleUncached(
|
|
|
251
339
|
id = resolution.specifier;
|
|
252
340
|
}
|
|
253
341
|
|
|
342
|
+
if (id.startsWith('.')) {
|
|
343
|
+
// Another bundle. Should already be loaded.
|
|
344
|
+
return {};
|
|
345
|
+
}
|
|
346
|
+
|
|
254
347
|
return defaultRequire(id);
|
|
255
348
|
};
|
|
256
349
|
|
|
257
|
-
// @ts-ignore
|
|
258
350
|
require.resolve = defaultRequire.resolve;
|
|
259
351
|
|
|
260
352
|
return runModule(code, asset.filePath, cacheKey, require, parcelRequire);
|
|
@@ -264,13 +356,13 @@ async function loadBundleUncached(
|
|
|
264
356
|
return loadAsset(nullthrows(assetsByPublicId.get(publicId)));
|
|
265
357
|
};
|
|
266
358
|
|
|
267
|
-
|
|
359
|
+
parcelRequire.root = parcelRequire;
|
|
360
|
+
|
|
268
361
|
parcelRequire.meta = {
|
|
269
362
|
distDir: bundle.target.distDir,
|
|
270
363
|
publicUrl: bundle.target.publicUrl,
|
|
271
364
|
};
|
|
272
365
|
|
|
273
|
-
// @ts-ignore
|
|
274
366
|
parcelRequire.load = async (filePath: string) => {
|
|
275
367
|
let bundle = bundleGraph.getBundles().find(b => b.name === filePath);
|
|
276
368
|
if (bundle) {
|
|
@@ -327,7 +419,6 @@ async function loadBundleUncached(
|
|
|
327
419
|
return loadModule(id, filePath, env);
|
|
328
420
|
};
|
|
329
421
|
|
|
330
|
-
// @ts-ignore
|
|
331
422
|
require.resolve = defaultRequire.resolve;
|
|
332
423
|
|
|
333
424
|
return runModule(code, filePath, cacheKey, require, parcelRequire);
|
|
@@ -346,6 +437,7 @@ function runModule(
|
|
|
346
437
|
require: (id: string) => any,
|
|
347
438
|
parcelRequire: (id: string) => any,
|
|
348
439
|
) {
|
|
440
|
+
// code = code.replace(/import\((['"].*?['"])\)/g, (_, m) => `parcelRequire.load(${m[0] + m.slice(3)})`);
|
|
349
441
|
let moduleFunction = vm.compileFunction(
|
|
350
442
|
code,
|
|
351
443
|
[
|
|
@@ -369,6 +461,7 @@ function runModule(
|
|
|
369
461
|
filename,
|
|
370
462
|
id,
|
|
371
463
|
path: dirname,
|
|
464
|
+
bundle: parcelRequire,
|
|
372
465
|
};
|
|
373
466
|
|
|
374
467
|
moduleCache.set(id, module);
|