Remove remote urls from import scanner (#256)
* fix: remove remote urls from import scanner * debug test
This commit is contained in:
parent
5dc3aa007a
commit
be804499b0
2 changed files with 5 additions and 1 deletions
|
@ -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 }));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue