Skip to content

Commit

Permalink
Use commerce apps
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Candeia <marrcooos@gmail.com>
  • Loading branch information
mcandeia committed Aug 31, 2023
1 parent 863c5ec commit 507192e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions compat/std/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ export default function Std(
{ manifest: AppManifest; sourceMap: SourceMap }
> = {};

const commerceApp = commerce(props);
const { dependencies, ...commerceApp } = commerce(
props,
);
const state: State = { ...props.commerce };
if (isVTEXProps(props.commerce)) {
state.configVTEX = {
Expand Down Expand Up @@ -285,7 +287,7 @@ export default function Std(
};
}
const liveApp = $live(props);
const webSiteApp = commerceApp.dependencies![0];
const { resolvables: _ignoreResolvables, ...webSiteApp } = dependencies![0];
const sourceMap: SourceMap = {
...buildSourceMap(manifest),
};
Expand Down Expand Up @@ -320,6 +322,9 @@ export default function Std(
state,
sourceMap,
manifest: _manifest as Manifest,
dependencies: [liveApp, commerceApp],
dependencies: [liveApp, {
...commerceApp,
dependencies: [webSiteApp, dependencies![1]],
}],
};
}
2 changes: 1 addition & 1 deletion import_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@preact/signals-core": "https://esm.sh/@preact/signals-core@1.3.0",
"std/": "https://deno.land/std@0.190.0/",
"partytown/": "https://deno.land/x/partytown@0.3.4/",
"deco-sites/std/": "https://denopkg.com/deco-sites/std@1.20.15/",
"deco-sites/std/": "https://denopkg.com/deco-sites/std@1.21.4/",
"deco/": "https://denopkg.com/deco-cx/deco@1.32.0/"
}
}

0 comments on commit 507192e

Please sign in to comment.