@pronto-tools-and-more/components-renderer 9.6.0 → 9.8.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -9,8 +9,8 @@ export const renderCustomElementList = (element, renderElement) => {
|
|
9
9
|
name: `$functions.id($context, 'content', 'name')`,
|
10
10
|
description: `$functions.id($context, 'content', 'description')`,
|
11
11
|
imageSrc: `$functions.id($context, 'content', 'thumbnails', 'default')`,
|
12
|
-
slug: `$functions.id($context, 'properties', 'slug')`,
|
13
|
-
metadataVideoPodcast: `$functions.id($context, 'properties', 'metadataVideoPodcast')`,
|
12
|
+
slug: `$functions.id($context, 'content', 'properties', 'slug')`,
|
13
|
+
metadataVideoPodcast: `$functions.id($context, 'content', 'properties', 'metadataVideoPodcast')`,
|
14
14
|
});
|
15
15
|
const final = renderElement(node);
|
16
16
|
return {
|
@@ -4,8 +4,16 @@ import * as LoadRoutes from "../LoadRoutes/LoadRoutes.js";
|
|
4
4
|
import * as LoadSwc from "../LoadSwc/LoadSwc.js";
|
5
5
|
import * as RenderView from "../RenderView/RenderView.js";
|
6
6
|
import * as SetAssetDir from "../SetAssetDir/SetAssetDir.js";
|
7
|
+
import * as SetPathPrefix from "../SetPathPrefix/SetPathPrefix.js";
|
7
8
|
import * as SwcNodePath from "../SwcNodePath/SwcNodePath.js";
|
8
9
|
|
10
|
+
const getRealPathPrefix = (isBuild, pathPrefix) => {
|
11
|
+
if (!isBuild) {
|
12
|
+
return "/#";
|
13
|
+
}
|
14
|
+
return pathPrefix;
|
15
|
+
};
|
16
|
+
|
9
17
|
export const renderViews = async (
|
10
18
|
componentsPathMain,
|
11
19
|
tsconfigPath,
|
@@ -20,6 +28,9 @@ export const renderViews = async (
|
|
20
28
|
const assetDir = isBuild ? "resource://dynamic/storefront/assets" : "";
|
21
29
|
SetAssetDir.setAssetDir(assetDir);
|
22
30
|
|
31
|
+
const realPathPrefix = getRealPathPrefix(isBuild, pathPrefix);
|
32
|
+
SetPathPrefix.setPathPrefix(realPathPrefix);
|
33
|
+
|
23
34
|
const module = await LoadRoutes.loadRoutes(componentsPathMain);
|
24
35
|
const values = Object.values(module);
|
25
36
|
// TODO return views string instead of json for faster performance?
|