Skip to content

Commit

Permalink
fix: use internal _vite tag instead of generating code to call __vite…
Browse files Browse the repository at this point in the history
…RenderAssets
  • Loading branch information
mlrawlings committed Apr 25, 2022
1 parent d245ef3 commit c711065
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/render-assets-transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@ export default (tag: types.NodePath<types.MarkoTag>, t: typeof types) => {
};

function renderAssetsCall(t: typeof types, slot: string) {
return t.markoPlaceholder(
t.callExpression(
t.memberExpression(
t.memberExpression(t.identifier("out"), t.identifier("global")),
t.identifier("___viteRenderAssets")
),
[t.stringLiteral(slot)]
),
false
return t.markoTag(
t.stringLiteral("_vite"),
[t.markoAttribute("slot", t.stringLiteral(slot))],
t.markoTagBody()
);
}

0 comments on commit c711065

Please sign in to comment.