diff --git a/bin/pest-tia-vite-deps.mjs b/bin/pest-tia-vite-deps.mjs index f39af3955..bcc941cac 100644 --- a/bin/pest-tia-vite-deps.mjs +++ b/bin/pest-tia-vite-deps.mjs @@ -172,6 +172,46 @@ export async function loadAliasFromViteConfig(projectRoot = PROJECT_ROOT) { return alias } +const SFC_RE = /\.(vue|svelte)$/i +const SCRIPT_BLOCK_RE = /]*)>([\s\S]*?)<\/script>/gi +const LANG_ATTR_RE = /\blang\s*=\s*['"]?([a-z]+)['"]?/i +const SRC_ATTR_RE = /\bsrc\s*=\s*['"]([^'"]+)['"]/i + +// A Single-File Component is not JavaScript, so the parser rejects the raw file. +// The graph only needs the import edges, and every one of them lives in a +// ` + VUE, + 'js', + ["import Layout from '@/Layouts/AppLayout.vue'", 'export default null'], + ['