Skip to content

Commit

Permalink
fix: remove incorrect module path resoltion, set correct rollup bundl…
Browse files Browse the repository at this point in the history
…e input
  • Loading branch information
digitalsadhu committed Nov 10, 2023
1 parent e354e3b commit 4f86c0f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions api/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,13 @@ export async function build({ state, config, cwd = process.cwd() }) {
if (existsSync(CONTENT_SRC_FILEPATH)) {
writeFileSync(
CONTENT_ENTRY,
`import "${require.resolve(
'@lit-labs/ssr-client/lit-element-hydrate-support.js',
)}";import Component from "${CONTENT_SRC_FILEPATH}";customElements.define("${NAME}-content",Component);`,
`import "@lit-labs/ssr-client/lit-element-hydrate-support.js";import Component from "${CONTENT_SRC_FILEPATH}";customElements.define("${NAME}-content",Component);`,
);
}
if (existsSync(FALLBACK_SRC_FILEPATH)) {
writeFileSync(
FALLBACK_ENTRY,
`import "${require.resolve(
'@lit-labs/ssr-client/lit-element-hydrate-support.js',
)}";import Component from "${FALLBACK_SRC_FILEPATH}";customElements.define("${NAME}-fallback",Component);`,
`import "@lit-labs/ssr-client/lit-element-hydrate-support.js";import Component from "${FALLBACK_SRC_FILEPATH}";customElements.define("${NAME}-fallback",Component);`,
);
}

Expand Down Expand Up @@ -202,7 +198,7 @@ export async function build({ state, config, cwd = process.cwd() }) {
async function buildRollupConfig(options) {
const rollupConfig = [];
for (const filepath of options) {
const input = filepath.replace('-entrypoint', '');
const input = filepath

let outfile;
if (filepath === CONTENT_ENTRY) {
Expand Down

0 comments on commit 4f86c0f

Please sign in to comment.