@pronto-tools-and-more/components-renderer 14.51.0 → 14.55.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components-renderer",
3
- "version": "14.51.0",
3
+ "version": "14.55.0",
4
4
  "description": "",
5
5
  "main": "src/componentsRendererMain.js",
6
6
  "type": "module",
@@ -4,6 +4,7 @@ import * as LoadRoutes from "../LoadRoutes/LoadRoutes.js";
4
4
  import * as RefData from "../RefData/RefData.js";
5
5
  import * as RenderView from "../RenderView/RenderView.js";
6
6
  import * as SetAssetDir from "../SetAssetDir/SetAssetDir.js";
7
+ import * as SetImageConfig from "../SetImageConfig/SetImageConfig.js";
7
8
  import * as SetPathPrefix from "../SetPathPrefix/SetPathPrefix.js";
8
9
 
9
10
  const getRealPathPrefix = (isBuild, pathPrefix) => {
@@ -19,12 +20,14 @@ export const renderViews = async ({
19
20
  pathPrefix,
20
21
  supportsNormalHtml,
21
22
  isBuild,
23
+ imageConfig,
22
24
  }) => {
23
25
  Assert.string(componentsPath);
24
26
  Assert.string(tsconfigPath);
25
27
 
26
28
  const assetDir = isBuild ? "resource://dynamic/storefront/assets" : "";
27
29
  SetAssetDir.setAssetDir(assetDir);
30
+ SetImageConfig.setImageConfig(imageConfig);
28
31
 
29
32
  const realPathPrefix = getRealPathPrefix(isBuild, pathPrefix);
30
33
  SetPathPrefix.setPathPrefix(realPathPrefix);
@@ -0,0 +1,8 @@
1
+ export const setImageConfig = (imageConfig) => {
2
+ if (!imageConfig) {
3
+ return;
4
+ }
5
+ // TODO use import meta env once supported
6
+ // @ts-ignore
7
+ process.env.PRONTO_IMAGE_CONFIG = JSON.stringify(imageConfig);
8
+ };