summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/astro/src/build.ts5
-rw-r--r--packages/astro/test/astro-children.test.js1
2 files changed, 5 insertions, 1 deletions
diff --git a/packages/astro/src/build.ts b/packages/astro/src/build.ts
index 208072390..f8faf1b77 100644
--- a/packages/astro/src/build.ts
+++ b/packages/astro/src/build.ts
@@ -248,7 +248,10 @@ export function findDeps(html: string, { astroConfig, srcPath }: { astroConfig:
if (!text) return;
const [imports] = eslexer.parse(text);
for (const spec of imports) {
- if (spec.n) pageDeps.js.add(spec.n);
+ const importSrc = spec.n;
+ if (importSrc && !isRemote(importSrc)) {
+ pageDeps.js.add(getDistPath(importSrc, { astroConfig, srcPath }));
+ }
}
}
});
diff --git a/packages/astro/test/astro-children.test.js b/packages/astro/test/astro-children.test.js
index f986887de..bb96a750d 100644
--- a/packages/astro/test/astro-children.test.js
+++ b/packages/astro/test/astro-children.test.js
@@ -10,6 +10,7 @@ setupBuild(ComponentChildren, './fixtures/astro-children');
ComponentChildren('Passes string children to framework components', async ({ runtime }) => {
let result = await runtime.load('/strings');
+ console.log(JSON.stringify(result, null, 2));
if (result.error) throw new Error(result);
const $ = doc(result.contents);