Skip to main content
Fallow analyzes more than .js and .ts files. It extracts imports and exports from non-JavaScript file types automatically based on their extension, with no plugins or config needed.
Fallow extracts the <script> block from Vue and Svelte single-file components and analyzes it like a standalone JS/TS module.What’s supported:
  • <script> and <script setup> blocks
  • lang="ts" and lang="tsx" attributes
  • <script src="./external.ts"> external script references
  • HTML comments (<!-- ... -->) are filtered out before parsing
Example.vue
<script setup lang="ts">
import { ref } from 'vue'
import { formatDate } from '@/utils/date'

const count = ref(0)
</script>

<template>
  <div>{{ formatDate(new Date()) }}</div>
</template>
Fallow sees this file as importing ref from vue and formatDate from @/utils/date.
Svelte components export props implicitly. Fallow cannot distinguish between props and utility exports, which may cause false negatives for unused exports in .svelte files. See Limitations for details.

See also

Dead code analysis

How fallow builds the module graph and detects unused code.

Built-in plugins

84 framework plugins for automatic entry point detection.