Skip to content

Commit

Permalink
explain example
Browse files Browse the repository at this point in the history
  • Loading branch information
dburles committed Oct 18, 2023
1 parent f15577f commit 71af52b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const linkRelations = await resolveLinkRelations({
// The application path.
appPath: "./app",
// The requested module.
url: "/lib/a.js",
}); // => ['/lib/c.js', '/lib/d.js']
url: "/lib/a.js", // a.js imports b.js, b.js imports c.js, c.js imports d.js
}); // => ['/lib/c.js', '/lib/d.js'] // Direct imports aren't included in the result.

// Optionally format the result:
const formattedLinkRelations = formatLinkHeaderRelations(linkRelations); // => </lib/c.js>; rel="modulepreload", </lib/d.js>; rel="modulepreload"
Expand Down

0 comments on commit 71af52b

Please sign in to comment.