@parcel/packager-react-static 2.14.4 → 2.14.5-canary.3437
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.
|
@@ -399,11 +399,16 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
399
399
|
throw new Error(`Could not resolve module "${id}" from "${from}"`);
|
|
400
400
|
}
|
|
401
401
|
let defaultRequire = _module().default.createRequire(from);
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
let resolution = res.resolution;
|
|
403
|
+
if (resolution.type === 'Builtin') {
|
|
404
|
+
let {
|
|
405
|
+
scheme,
|
|
406
|
+
module
|
|
407
|
+
} = resolution.value;
|
|
408
|
+
return defaultRequire(scheme ? `${scheme}:${module}` : module);
|
|
404
409
|
}
|
|
405
|
-
if (
|
|
406
|
-
let cacheKey =
|
|
410
|
+
if (resolution.type === 'Path') {
|
|
411
|
+
let cacheKey = resolution.value + '#' + env;
|
|
407
412
|
const cachedModule = moduleCache.get(cacheKey);
|
|
408
413
|
if (cachedModule) {
|
|
409
414
|
return cachedModule.exports;
|
|
@@ -412,7 +417,7 @@ async function loadBundleUncached(bundle, bundleGraph, getInlineBundleContents)
|
|
|
412
417
|
if (assetId) {
|
|
413
418
|
return loadAsset(assetId);
|
|
414
419
|
}
|
|
415
|
-
let filePath =
|
|
420
|
+
let filePath = resolution.value;
|
|
416
421
|
let code = _fs().default.readFileSync(filePath, 'utf8');
|
|
417
422
|
let require = id => {
|
|
418
423
|
return loadModule(id, filePath, env);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parcel/packager-react-static",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.5-canary.3437+40ebdcd87",
|
|
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.
|
|
20
|
+
"parcel": "^2.0.0-canary.1812+40ebdcd87"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@parcel/node-resolver-core": "3.5.
|
|
24
|
-
"@parcel/plugin": "2.
|
|
25
|
-
"@parcel/rust": "2.14.
|
|
26
|
-
"@parcel/types": "2.
|
|
27
|
-
"@parcel/utils": "2.
|
|
23
|
+
"@parcel/node-resolver-core": "3.5.5-canary.3437+40ebdcd87",
|
|
24
|
+
"@parcel/plugin": "2.0.0-canary.1814+40ebdcd87",
|
|
25
|
+
"@parcel/rust": "2.14.5-canary.3437+40ebdcd87",
|
|
26
|
+
"@parcel/types": "2.0.0-canary.1814+40ebdcd87",
|
|
27
|
+
"@parcel/utils": "2.0.0-canary.1814+40ebdcd87",
|
|
28
28
|
"nullthrows": "^1.1.1",
|
|
29
29
|
"rsc-html-stream": "^0.0.5"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "40ebdcd87a4bb51df3b060a05aad005595de8558"
|
|
32
32
|
}
|
|
@@ -439,12 +439,14 @@ async function loadBundleUncached(
|
|
|
439
439
|
}
|
|
440
440
|
|
|
441
441
|
let defaultRequire = Module.createRequire(from);
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
let resolution = res.resolution;
|
|
443
|
+
if (resolution.type === 'Builtin') {
|
|
444
|
+
let {scheme, module} = resolution.value;
|
|
445
|
+
return defaultRequire(scheme ? `${scheme}:${module}` : module);
|
|
444
446
|
}
|
|
445
447
|
|
|
446
|
-
if (
|
|
447
|
-
let cacheKey =
|
|
448
|
+
if (resolution.type === 'Path') {
|
|
449
|
+
let cacheKey = resolution.value + '#' + env;
|
|
448
450
|
const cachedModule = moduleCache.get(cacheKey);
|
|
449
451
|
if (cachedModule) {
|
|
450
452
|
return cachedModule.exports;
|
|
@@ -455,7 +457,7 @@ async function loadBundleUncached(
|
|
|
455
457
|
return loadAsset(assetId);
|
|
456
458
|
}
|
|
457
459
|
|
|
458
|
-
let filePath =
|
|
460
|
+
let filePath = resolution.value;
|
|
459
461
|
let code = fs.readFileSync(filePath, 'utf8');
|
|
460
462
|
let require = (id: string) => {
|
|
461
463
|
return loadModule(id, filePath, env);
|