feat: allow skipping virtual dependencies

This commit is contained in:
Dylan Piercey 2023-08-08 11:57:03 -07:00 committed by Dylan Piercey
parent ec21e799f3
commit 17099cd8ff
2 changed files with 10 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
"@marko/translator-default": patch
"marko": patch
---
Allow skipping output of virtual dependencies by returning a falsey value from the `resolveVirtualDependency` option.

View File

@ -159,6 +159,10 @@ export default (entryFile, isHydrate) => {
code,
virtualPath,
});
if (!dep) {
continue;
}
} else if (dep.startsWith("package:")) {
continue;
}