Skip to content
Fallow home
All docs pages

Non-JS file types

Files that only HTML, Vue, Svelte, Astro, MDX, GraphQL, or CSS reference still count as used. Fallow reads these file types and React Native platform files with no plugin or config.

A file that only an HTML page, a Vue template, or a stylesheet references is not unused. Fallow analyzes more than .js and .ts files: it reads imports and exports from non-JavaScript file types, based on the file extension. You do not need a plugin or config.

Fallow finds .html files and reads the <script src> and <link> tags as module graph edges. This covers projects with HTML entry points, such as Parcel or setups with no framework.

Fallow reads:

  • <script src="./main.js"> script references
  • <link rel="stylesheet" href="./styles.css"> stylesheet references
  • <link rel="modulepreload" href="./vendor.js"> module preload references
  • Root-relative paths (for example <script src="/src/main.tsx">). Fallow resolves them against the directory of the HTML file first, then against the project root, then against public/ in the project root. html tagged templates in JS and TS files use the same order, without the public/ step (see the SSR layouts tab).
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="./styles/main.css" />
    <link rel="modulepreload" href="./vendor/lodash.js" />
  </head>
  <body>
    <div id="app"></div>
    <script src="./src/main.ts"></script>
  </body>
</html>

Fallow reads references to ./styles/main.css, ./vendor/lodash.js, and ./src/main.ts from this file.

The Parcel plugin adds index.html as an entry pattern, so fallow finds HTML entry files with no extra config.

Angular template complexity. fallow health reports the complexity of Angular templates as synthetic &lt;template&gt; findings. This covers standalone .html files that templateUrl references and inline @Component({ template: \...` })` literals. Fallow counts these template constructs:

  • control-flow blocks (@if, @for, @switch, @case, @defer (when ...), @let)
  • legacy structural directives (*ngIf, *ngFor)
  • bound attributes ([x], (x), bind-x, on-x)
  • \{\{ \}\} interpolations

Fallow reports an inline-template finding on the @Component decorator line. To suppress it, put // fallow-ignore-next-line complexity directly above the decorator. To suppress an external-template finding, put &lt;!-- fallow-ignore-file complexity --&gt; at the top of the .html file.

See also