@lwrjs/view-registry 0.12.0-alpha.25 → 0.12.0-alpha.27
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/build/cjs/index.cjs
CHANGED
|
@@ -57,6 +57,10 @@ var LwrViewRegistry = class {
|
|
|
57
57
|
observer.onAssetSourceChange(({payload}) => this.onAssetSourceChange(payload));
|
|
58
58
|
}
|
|
59
59
|
async onModuleDefinitionChange(moduleDefinition) {
|
|
60
|
+
if (process.env.MRT_HMR === "true") {
|
|
61
|
+
this.viewDefinitions.clear();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
60
64
|
const versionedSpecifier = (0, import_shared_utils.getSpecifier)(moduleDefinition);
|
|
61
65
|
for (const [id, viewDefEntry] of this.viewDefinitions.entries()) {
|
|
62
66
|
const {
|
|
@@ -34,8 +34,7 @@ var import_utils2 = __toModule(require("./utils.cjs"));
|
|
|
34
34
|
var import_preload_utils = __toModule(require("./preload-utils.cjs"));
|
|
35
35
|
function includeIdFactory(bundleConfig) {
|
|
36
36
|
return (moduleRef) => {
|
|
37
|
-
|
|
38
|
-
if (external && external[moduleRef.specifier] !== void 0) {
|
|
37
|
+
if ((0, import_shared_utils.isExternalSpecifier)(moduleRef.specifier, bundleConfig)) {
|
|
39
38
|
return false;
|
|
40
39
|
}
|
|
41
40
|
return true;
|
package/build/es/index.js
CHANGED
|
@@ -36,6 +36,11 @@ export class LwrViewRegistry {
|
|
|
36
36
|
observer.onAssetSourceChange(({ payload }) => this.onAssetSourceChange(payload));
|
|
37
37
|
}
|
|
38
38
|
async onModuleDefinitionChange(moduleDefinition) {
|
|
39
|
+
// TODO we will make this more robust in the future w/ full MRT HMR
|
|
40
|
+
if (process.env.MRT_HMR === 'true') {
|
|
41
|
+
this.viewDefinitions.clear();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
39
44
|
const versionedSpecifier = getSpecifier(moduleDefinition);
|
|
40
45
|
// invalidate viewDefinition cache entries with references to the LinkedModuleDefinition
|
|
41
46
|
for (const [id, viewDefEntry] of this.viewDefinitions.entries()) {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { logger } from '@lwrjs/diagnostics';
|
|
2
|
-
import { kebabCaseToModuleSpecifier, getModuleGraphs, GraphDepth, getModuleUriPrefix, explodeSpecifier, isBundler, getHydrateDirective, isGroupie, } from '@lwrjs/shared-utils';
|
|
2
|
+
import { kebabCaseToModuleSpecifier, getModuleGraphs, GraphDepth, getModuleUriPrefix, explodeSpecifier, isBundler, getHydrateDirective, isGroupie, isExternalSpecifier, } from '@lwrjs/shared-utils';
|
|
3
3
|
import { AppResourceEnum, getAppSpecifier } from '@lwrjs/app-service/identity';
|
|
4
4
|
import { generateHtmlTag, getModuleResourceByUri } from '../utils.js';
|
|
5
5
|
import { flattenCustomElements, getViewBootstrapConfigurationResource, getViewHmrConfigurationResource, } from './utils.js';
|
|
6
6
|
import { setPreloadModulesMeta, getPreloadModulesMeta } from './preload-utils.js';
|
|
7
7
|
function includeIdFactory(bundleConfig) {
|
|
8
8
|
return (moduleRef) => {
|
|
9
|
-
const { external } = bundleConfig || {};
|
|
10
9
|
// Do not bundle externals, including the loader module, which is auto bundled
|
|
11
10
|
// with the shim + loader combo
|
|
12
|
-
if (
|
|
11
|
+
if (isExternalSpecifier(moduleRef.specifier, bundleConfig)) {
|
|
13
12
|
// Do not include externals in the required imports but also return false to indicate it should not be in the bundle
|
|
14
13
|
return false;
|
|
15
14
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.12.0-alpha.
|
|
7
|
+
"version": "0.12.0-alpha.27",
|
|
8
8
|
"homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
"build/**/*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@lwrjs/app-service": "0.12.0-alpha.
|
|
34
|
-
"@lwrjs/diagnostics": "0.12.0-alpha.
|
|
35
|
-
"@lwrjs/instrumentation": "0.12.0-alpha.
|
|
36
|
-
"@lwrjs/shared-utils": "0.12.0-alpha.
|
|
33
|
+
"@lwrjs/app-service": "0.12.0-alpha.27",
|
|
34
|
+
"@lwrjs/diagnostics": "0.12.0-alpha.27",
|
|
35
|
+
"@lwrjs/instrumentation": "0.12.0-alpha.27",
|
|
36
|
+
"@lwrjs/shared-utils": "0.12.0-alpha.27",
|
|
37
37
|
"lru-cache": "^10.2.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@lwrjs/types": "0.12.0-alpha.
|
|
40
|
+
"@lwrjs/types": "0.12.0-alpha.27"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"node": ">=18.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "84406699a78e2a81882df74a50467e5376a00a90"
|
|
46
46
|
}
|