Open History to see the last commit
1import { createFileRoute } from '@tanstack/react-router'
2β
3export const Route = createFileRoute('/async-scripts')({
4 head: () => ({
5 scripts: [
6 {
7 src: 'script.js',
8 async: true,
9 },
10 {
11 src: 'script2.js',
12 defer: true,
13 },
14 ],
15 }),
16 component: AsyncScriptsComponent,
17})
18β
19function AsyncScriptsComponent() {
20 return (
21 <div className="p-2">
22 <h3 data-testid="async-scripts-test-heading">Async Scripts Test</h3>
23 <p>This page tests scripts with async and defer attributes.</p>
24 </div>
25 )
26}