Skip to content

Commit

Permalink
fix: bypass the node resolve algorithm that was using the node.js ver…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
digitalsadhu committed Aug 20, 2024
1 parent 3044e04 commit 39dfa96
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/lit-labs-ssr-client/esbuild.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import { join, dirname } from "node:path";
import { createRequire } from "module";
import { build } from "../../esbuild.js";

const { resolve } = createRequire(import.meta.url);

const renderLightDirectivePath = resolve("@lit-labs/ssr-client/directives/render-light.js");
const litElementHydrateSupportPath = join(dirname(renderLightDirectivePath), '..', 'lit-element-hydrate-support.js');

await Promise.all([
build({
entryPoints: [resolve("@lit-labs/ssr-client/lit-element-hydrate-support.js")],
entryPoints: [litElementHydrateSupportPath],
outfile: "./dist/lit-element-hydrate-support.js",
}),
build({
entryPoints: [resolve("@lit-labs/ssr-client/directives/render-light.js")],
entryPoints: [renderLightDirectivePath],
outfile: "./dist/directives/render-light.js",
}),
]);

0 comments on commit 39dfa96

Please sign in to comment.