@atlaspack/runtime-js 2.12.1-canary.3591 → 2.12.1-canary.3593
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/JSRuntime.js
CHANGED
|
@@ -486,7 +486,8 @@ function getLoaderRuntime({
|
|
|
486
486
|
}
|
|
487
487
|
let code = [];
|
|
488
488
|
if (needsEsmLoadPrelude) {
|
|
489
|
-
|
|
489
|
+
let preludeLoad = shardingConfig ? `let load = require('./helpers/browser/esm-js-loader-shards')(${shardingConfig.maxShards});` : `let load = require('./helpers/browser/esm-js-loader');`;
|
|
490
|
+
code.push(preludeLoad);
|
|
490
491
|
}
|
|
491
492
|
code.push(`module.exports = ${loaderCode};`);
|
|
492
493
|
return {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var load = function (maxShards) {
|
|
4
|
+
return function (id) {
|
|
5
|
+
// eslint-disable-next-line no-undef
|
|
6
|
+
return __parcel__import__(require('@atlaspack/domain-sharding').shardUrl(require('../bundle-manifest').resolve(id), maxShards));
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
module.exports = load;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/runtime-js",
|
|
3
|
-
"version": "2.12.1-canary.
|
|
3
|
+
"version": "2.12.1-canary.3593+878d5a63d",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"main": "lib/JSRuntime.js",
|
|
13
13
|
"source": "src/JSRuntime.js",
|
|
14
14
|
"engines": {
|
|
15
|
-
"atlaspack": "2.12.1-canary.
|
|
15
|
+
"atlaspack": "2.12.1-canary.3593+878d5a63d",
|
|
16
16
|
"node": ">= 16.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.12.1-canary.
|
|
20
|
-
"@atlaspack/domain-sharding": "2.12.1-canary.
|
|
21
|
-
"@atlaspack/feature-flags": "2.12.1-canary.
|
|
22
|
-
"@atlaspack/plugin": "2.12.1-canary.
|
|
23
|
-
"@atlaspack/utils": "2.12.1-canary.
|
|
19
|
+
"@atlaspack/diagnostic": "2.12.1-canary.3593+878d5a63d",
|
|
20
|
+
"@atlaspack/domain-sharding": "2.12.1-canary.3593+878d5a63d",
|
|
21
|
+
"@atlaspack/feature-flags": "2.12.1-canary.3593+878d5a63d",
|
|
22
|
+
"@atlaspack/plugin": "2.12.1-canary.3593+878d5a63d",
|
|
23
|
+
"@atlaspack/utils": "2.12.1-canary.3593+878d5a63d",
|
|
24
24
|
"nullthrows": "^1.1.1"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "878d5a63d09b3edb00514cda6e159db64b312b3f"
|
|
27
27
|
}
|
package/src/JSRuntime.js
CHANGED
|
@@ -625,7 +625,11 @@ function getLoaderRuntime({
|
|
|
625
625
|
let code = [];
|
|
626
626
|
|
|
627
627
|
if (needsEsmLoadPrelude) {
|
|
628
|
-
|
|
628
|
+
let preludeLoad = shardingConfig
|
|
629
|
+
? `let load = require('./helpers/browser/esm-js-loader-shards')(${shardingConfig.maxShards});`
|
|
630
|
+
: `let load = require('./helpers/browser/esm-js-loader');`;
|
|
631
|
+
|
|
632
|
+
code.push(preludeLoad);
|
|
629
633
|
}
|
|
630
634
|
|
|
631
635
|
code.push(`module.exports = ${loaderCode};`);
|