@nx/remix 20.0.7 → 20.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/migrations.json +29 -0
  2. package/package.json +7 -5
  3. package/src/generators/application/__snapshots__/application.impl.spec.ts.snap +126 -343
  4. package/src/generators/application/application.impl.js +10 -48
  5. package/src/generators/application/files/common/app/entry.client.tsx__tmpl__ +18 -0
  6. package/src/generators/application/files/common/app/entry.server.tsx__tmpl__ +140 -0
  7. package/src/generators/application/files/common/app/root.tsx__tmpl__ +20 -5
  8. package/src/generators/application/files/common/tsconfig.app.json__tmpl__ +5 -2
  9. package/src/generators/application/files/common/tsconfig.json__tmpl__ +6 -3
  10. package/src/generators/application/files/common/vite.config.ts__tmpl__ +25 -0
  11. package/src/generators/application/files/integrated/package.json__tmpl__ +3 -4
  12. package/src/generators/application/lib/add-e2e.js +1 -1
  13. package/src/generators/application/lib/add-vite-temp-files-to-gitignore.d.ts +2 -0
  14. package/src/generators/application/lib/add-vite-temp-files-to-gitignore.js +18 -0
  15. package/src/generators/application/lib/index.d.ts +1 -0
  16. package/src/generators/application/lib/index.js +1 -0
  17. package/src/generators/application/schema.d.ts +0 -1
  18. package/src/generators/application/schema.json +0 -5
  19. package/src/generators/convert-to-inferred/convert-to-inferred.js +1 -1
  20. package/src/generators/preset/lib/normalize-options.d.ts +0 -1
  21. package/src/generators/preset/preset.impl.js +0 -1
  22. package/src/generators/setup-tailwind/__snapshots__/setup-tailwind.impl.spec.ts.snap +32 -112
  23. package/src/generators/setup-tailwind/files/postcss.config.js__tpl__ +6 -0
  24. package/src/generators/setup-tailwind/schema.d.ts +0 -1
  25. package/src/generators/setup-tailwind/schema.json +0 -5
  26. package/src/generators/setup-tailwind/setup-tailwind.impl.js +2 -8
  27. package/src/generators/utils/update-dependencies.js +2 -0
  28. package/src/plugins/plugin.js +5 -3
  29. package/src/utils/remix-config.d.ts +1 -0
  30. package/src/utils/remix-config.js +37 -6
  31. package/src/utils/remix-route-utils.js +4 -1
  32. package/src/utils/versions.d.ts +4 -1
  33. package/src/utils/versions.js +5 -2
  34. package/src/generators/application/files/common/remix.config.js__tmpl__ +0 -17
  35. package/src/generators/application/files/common/remix.env.d.ts__tmpl__ +0 -2
  36. package/src/generators/setup-tailwind/lib/index.d.ts +0 -1
  37. package/src/generators/setup-tailwind/lib/index.js +0 -4
  38. package/src/generators/setup-tailwind/lib/update-remix-config.d.ts +0 -2
  39. package/src/generators/setup-tailwind/lib/update-remix-config.js +0 -34
@@ -1,36 +1,14 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`Remix Application Integrated Repo --directory should create the application correctly 1`] = `
4
- "import { createWatchPaths } from '@nx/remix';
5
- import { dirname } from 'path';
6
- import { fileURLToPath } from 'url';
7
-
8
- const __dirname = dirname(fileURLToPath(import.meta.url));
9
-
10
- /**
11
- * @type {import('@remix-run/dev').AppConfig}
12
- */
13
- export default {
14
- ignoredRouteFiles: ['**/.*'],
15
- // appDirectory: "app",
16
- // assetsBuildDirectory: "public/build",
17
- // serverBuildPath: "build/index.js",
18
- // publicPath: "/build/",
19
- watchPaths: () => createWatchPaths(__dirname),
20
- };
21
- "
22
- `;
23
-
24
- exports[`Remix Application Integrated Repo --directory should create the application correctly 2`] = `
25
- "import type { MetaFunction } from '@remix-run/node';
26
- import {
4
+ "import {
27
5
  Links,
28
- LiveReload,
29
6
  Meta,
30
7
  Outlet,
31
8
  Scripts,
32
9
  ScrollRestoration,
33
10
  } from '@remix-run/react';
11
+ import type { MetaFunction, LinksFunction } from '@remix-run/node';
34
12
 
35
13
  export const meta: MetaFunction = () => [
36
14
  {
@@ -38,7 +16,20 @@ export const meta: MetaFunction = () => [
38
16
  },
39
17
  ];
40
18
 
41
- export default function App() {
19
+ export const links: LinksFunction = () => [
20
+ { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
21
+ {
22
+ rel: 'preconnect',
23
+ href: 'https://fonts.gstatic.com',
24
+ crossOrigin: 'anonymous',
25
+ },
26
+ {
27
+ rel: 'stylesheet',
28
+ href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
29
+ },
30
+ ];
31
+
32
+ export function Layout({ children }: { children: React.ReactNode }) {
42
33
  return (
43
34
  <html lang="en">
44
35
  <head>
@@ -48,18 +39,21 @@ export default function App() {
48
39
  <Links />
49
40
  </head>
50
41
  <body>
51
- <Outlet />
42
+ {children}
52
43
  <ScrollRestoration />
53
44
  <Scripts />
54
- <LiveReload />
55
45
  </body>
56
46
  </html>
57
47
  );
58
48
  }
49
+
50
+ export default function App() {
51
+ return <Outlet />;
52
+ }
59
53
  "
60
54
  `;
61
55
 
62
- exports[`Remix Application Integrated Repo --directory should create the application correctly 3`] = `
56
+ exports[`Remix Application Integrated Repo --directory should create the application correctly 2`] = `
63
57
  "import NxWelcome from '../nx-welcome';
64
58
 
65
59
  export default function Index() {
@@ -73,36 +67,14 @@ export default function Index() {
73
67
  `;
74
68
 
75
69
  exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 1`] = `
76
- "import { createWatchPaths } from '@nx/remix';
77
- import { dirname } from 'path';
78
- import { fileURLToPath } from 'url';
79
-
80
- const __dirname = dirname(fileURLToPath(import.meta.url));
81
-
82
- /**
83
- * @type {import('@remix-run/dev').AppConfig}
84
- */
85
- export default {
86
- ignoredRouteFiles: ['**/.*'],
87
- // appDirectory: "app",
88
- // assetsBuildDirectory: "public/build",
89
- // serverBuildPath: "build/index.js",
90
- // publicPath: "/build/",
91
- watchPaths: () => createWatchPaths(__dirname),
92
- };
93
- "
94
- `;
95
-
96
- exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 2`] = `
97
- "import type { MetaFunction } from '@remix-run/node';
98
- import {
70
+ "import {
99
71
  Links,
100
- LiveReload,
101
72
  Meta,
102
73
  Outlet,
103
74
  Scripts,
104
75
  ScrollRestoration,
105
76
  } from '@remix-run/react';
77
+ import type { MetaFunction, LinksFunction } from '@remix-run/node';
106
78
 
107
79
  export const meta: MetaFunction = () => [
108
80
  {
@@ -110,7 +82,20 @@ export const meta: MetaFunction = () => [
110
82
  },
111
83
  ];
112
84
 
113
- export default function App() {
85
+ export const links: LinksFunction = () => [
86
+ { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
87
+ {
88
+ rel: 'preconnect',
89
+ href: 'https://fonts.gstatic.com',
90
+ crossOrigin: 'anonymous',
91
+ },
92
+ {
93
+ rel: 'stylesheet',
94
+ href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
95
+ },
96
+ ];
97
+
98
+ export function Layout({ children }: { children: React.ReactNode }) {
114
99
  return (
115
100
  <html lang="en">
116
101
  <head>
@@ -120,18 +105,21 @@ export default function App() {
120
105
  <Links />
121
106
  </head>
122
107
  <body>
123
- <Outlet />
108
+ {children}
124
109
  <ScrollRestoration />
125
110
  <Scripts />
126
- <LiveReload />
127
111
  </body>
128
112
  </html>
129
113
  );
130
114
  }
115
+
116
+ export default function App() {
117
+ return <Outlet />;
118
+ }
131
119
  "
132
120
  `;
133
121
 
134
- exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 3`] = `
122
+ exports[`Remix Application Integrated Repo --directory should extract the layout directory from the directory options if it exists 2`] = `
135
123
  "import NxWelcome from '../nx-welcome';
136
124
 
137
125
  export default function Index() {
@@ -239,96 +227,7 @@ export default defineConfig({
239
227
  "
240
228
  `;
241
229
 
242
- exports[`Remix Application Integrated Repo --js should create the application correctly 1`] = `
243
- "import { createWatchPaths } from '@nx/remix';
244
- import { dirname } from 'path';
245
- import { fileURLToPath } from 'url';
246
-
247
- const __dirname = dirname(fileURLToPath(import.meta.url));
248
-
249
- /**
250
- * @type {import('@remix-run/dev').AppConfig}
251
- */
252
- export default {
253
- ignoredRouteFiles: ['**/.*'],
254
- // appDirectory: "app",
255
- // assetsBuildDirectory: "public/build",
256
- // serverBuildPath: "build/index.js",
257
- // publicPath: "/build/",
258
- watchPaths: () => createWatchPaths(__dirname),
259
- };
260
- "
261
- `;
262
-
263
- exports[`Remix Application Integrated Repo --js should create the application correctly 2`] = `
264
- "import {
265
- Links,
266
- LiveReload,
267
- Meta,
268
- Outlet,
269
- Scripts,
270
- ScrollRestoration,
271
- } from '@remix-run/react';
272
- export const meta = () => [
273
- {
274
- title: 'New Remix App',
275
- },
276
- ];
277
- export default function App() {
278
- return (
279
- <html lang="en">
280
- <head>
281
- <meta charSet="utf-8" />
282
- <meta name="viewport" content="width=device-width, initial-scale=1" />
283
- <Meta />
284
- <Links />
285
- </head>
286
- <body>
287
- <Outlet />
288
- <ScrollRestoration />
289
- <Scripts />
290
- <LiveReload />
291
- </body>
292
- </html>
293
- );
294
- }
295
- "
296
- `;
297
-
298
- exports[`Remix Application Integrated Repo --js should create the application correctly 3`] = `
299
- "import NxWelcome from '../nx-welcome';
300
- export default function Index() {
301
- return (
302
- <div>
303
- <NxWelcome title={'test'} />
304
- </div>
305
- );
306
- }
307
- "
308
- `;
309
-
310
230
  exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using jest 1`] = `
311
- "import { createWatchPaths } from '@nx/remix';
312
- import { dirname } from 'path';
313
- import { fileURLToPath } from 'url';
314
-
315
- const __dirname = dirname(fileURLToPath(import.meta.url));
316
-
317
- /**
318
- * @type {import('@remix-run/dev').AppConfig}
319
- */
320
- export default {
321
- ignoredRouteFiles: ['**/.*'],
322
- // appDirectory: "app",
323
- // assetsBuildDirectory: "public/build",
324
- // serverBuildPath: "build/index.js",
325
- // publicPath: "/build/",
326
- watchPaths: () => createWatchPaths(__dirname),
327
- };
328
- "
329
- `;
330
-
331
- exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using jest 2`] = `
332
231
  "export default {
333
232
  displayName: 'test',
334
233
  preset: '../jest.preset.js',
@@ -341,7 +240,7 @@ exports[`Remix Application Integrated Repo --unitTestRunner should generate the
341
240
  "
342
241
  `;
343
242
 
344
- exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using jest 3`] = `
243
+ exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using jest 2`] = `
345
244
  "import { installGlobals } from '@remix-run/node';
346
245
  import '@testing-library/jest-dom/matchers';
347
246
  installGlobals();
@@ -349,27 +248,6 @@ installGlobals();
349
248
  `;
350
249
 
351
250
  exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 1`] = `
352
- "import { createWatchPaths } from '@nx/remix';
353
- import { dirname } from 'path';
354
- import { fileURLToPath } from 'url';
355
-
356
- const __dirname = dirname(fileURLToPath(import.meta.url));
357
-
358
- /**
359
- * @type {import('@remix-run/dev').AppConfig}
360
- */
361
- export default {
362
- ignoredRouteFiles: ['**/.*'],
363
- // appDirectory: "app",
364
- // assetsBuildDirectory: "public/build",
365
- // serverBuildPath: "build/index.js",
366
- // publicPath: "/build/",
367
- watchPaths: () => createWatchPaths(__dirname),
368
- };
369
- "
370
- `;
371
-
372
- exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
373
251
  "/// <reference types='vitest' />
374
252
  import { defineConfig } from 'vite';
375
253
  import react from '@vitejs/plugin-react';
@@ -400,14 +278,14 @@ export default defineConfig({
400
278
  "
401
279
  `;
402
280
 
403
- exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 3`] = `
281
+ exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
404
282
  "import { installGlobals } from '@remix-run/node';
405
283
  import '@testing-library/jest-dom/matchers';
406
284
  installGlobals();
407
285
  "
408
286
  `;
409
287
 
410
- exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 4`] = `
288
+ exports[`Remix Application Integrated Repo --unitTestRunner should generate the correct files for testing using vitest 3`] = `
411
289
  "{
412
290
  "extends": "./tsconfig.json",
413
291
  "compilerOptions": {
@@ -441,36 +319,14 @@ exports[`Remix Application Integrated Repo --unitTestRunner should generate the
441
319
  `;
442
320
 
443
321
  exports[`Remix Application Integrated Repo should create the application correctly 1`] = `
444
- "import { createWatchPaths } from '@nx/remix';
445
- import { dirname } from 'path';
446
- import { fileURLToPath } from 'url';
447
-
448
- const __dirname = dirname(fileURLToPath(import.meta.url));
449
-
450
- /**
451
- * @type {import('@remix-run/dev').AppConfig}
452
- */
453
- export default {
454
- ignoredRouteFiles: ['**/.*'],
455
- // appDirectory: "app",
456
- // assetsBuildDirectory: "public/build",
457
- // serverBuildPath: "build/index.js",
458
- // publicPath: "/build/",
459
- watchPaths: () => createWatchPaths(__dirname),
460
- };
461
- "
462
- `;
463
-
464
- exports[`Remix Application Integrated Repo should create the application correctly 2`] = `
465
- "import type { MetaFunction } from '@remix-run/node';
466
- import {
322
+ "import {
467
323
  Links,
468
- LiveReload,
469
324
  Meta,
470
325
  Outlet,
471
326
  Scripts,
472
327
  ScrollRestoration,
473
328
  } from '@remix-run/react';
329
+ import type { MetaFunction, LinksFunction } from '@remix-run/node';
474
330
 
475
331
  export const meta: MetaFunction = () => [
476
332
  {
@@ -478,7 +334,20 @@ export const meta: MetaFunction = () => [
478
334
  },
479
335
  ];
480
336
 
481
- export default function App() {
337
+ export const links: LinksFunction = () => [
338
+ { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
339
+ {
340
+ rel: 'preconnect',
341
+ href: 'https://fonts.gstatic.com',
342
+ crossOrigin: 'anonymous',
343
+ },
344
+ {
345
+ rel: 'stylesheet',
346
+ href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
347
+ },
348
+ ];
349
+
350
+ export function Layout({ children }: { children: React.ReactNode }) {
482
351
  return (
483
352
  <html lang="en">
484
353
  <head>
@@ -488,18 +357,21 @@ export default function App() {
488
357
  <Links />
489
358
  </head>
490
359
  <body>
491
- <Outlet />
360
+ {children}
492
361
  <ScrollRestoration />
493
362
  <Scripts />
494
- <LiveReload />
495
363
  </body>
496
364
  </html>
497
365
  );
498
366
  }
367
+
368
+ export default function App() {
369
+ return <Outlet />;
370
+ }
499
371
  "
500
372
  `;
501
373
 
502
- exports[`Remix Application Integrated Repo should create the application correctly 3`] = `
374
+ exports[`Remix Application Integrated Repo should create the application correctly 2`] = `
503
375
  "import NxWelcome from '../nx-welcome';
504
376
 
505
377
  export default function Index() {
@@ -534,96 +406,7 @@ export default defineConfig({
534
406
  "
535
407
  `;
536
408
 
537
- exports[`Remix Application Standalone Project Repo --js should create the application correctly 1`] = `
538
- "import { createWatchPaths } from '@nx/remix';
539
- import { dirname } from 'path';
540
- import { fileURLToPath } from 'url';
541
-
542
- const __dirname = dirname(fileURLToPath(import.meta.url));
543
-
544
- /**
545
- * @type {import('@remix-run/dev').AppConfig}
546
- */
547
- export default {
548
- ignoredRouteFiles: ['**/.*'],
549
- // appDirectory: "app",
550
- // assetsBuildDirectory: "public/build",
551
- // serverBuildPath: "build/index.js",
552
- // publicPath: "/build/",
553
- watchPaths: () => createWatchPaths(__dirname),
554
- };
555
- "
556
- `;
557
-
558
- exports[`Remix Application Standalone Project Repo --js should create the application correctly 2`] = `
559
- "import {
560
- Links,
561
- LiveReload,
562
- Meta,
563
- Outlet,
564
- Scripts,
565
- ScrollRestoration,
566
- } from '@remix-run/react';
567
- export const meta = () => [
568
- {
569
- title: 'New Remix App',
570
- },
571
- ];
572
- export default function App() {
573
- return (
574
- <html lang="en">
575
- <head>
576
- <meta charSet="utf-8" />
577
- <meta name="viewport" content="width=device-width, initial-scale=1" />
578
- <Meta />
579
- <Links />
580
- </head>
581
- <body>
582
- <Outlet />
583
- <ScrollRestoration />
584
- <Scripts />
585
- <LiveReload />
586
- </body>
587
- </html>
588
- );
589
- }
590
- "
591
- `;
592
-
593
- exports[`Remix Application Standalone Project Repo --js should create the application correctly 3`] = `
594
- "import NxWelcome from '../nx-welcome';
595
- export default function Index() {
596
- return (
597
- <div>
598
- <NxWelcome title={'test'} />
599
- </div>
600
- );
601
- }
602
- "
603
- `;
604
-
605
409
  exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 1`] = `
606
- "import { createWatchPaths } from '@nx/remix';
607
- import { dirname } from 'path';
608
- import { fileURLToPath } from 'url';
609
-
610
- const __dirname = dirname(fileURLToPath(import.meta.url));
611
-
612
- /**
613
- * @type {import('@remix-run/dev').AppConfig}
614
- */
615
- export default {
616
- ignoredRouteFiles: ['**/.*'],
617
- // appDirectory: "app",
618
- // assetsBuildDirectory: "public/build",
619
- // serverBuildPath: "build/index.js",
620
- // publicPath: "/build/",
621
- watchPaths: () => createWatchPaths(__dirname),
622
- };
623
- "
624
- `;
625
-
626
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 2`] = `
627
410
  "export default {
628
411
  setupFilesAfterEnv: ['<rootDir>/test-setup.ts'],
629
412
  displayName: 'test',
@@ -640,14 +423,14 @@ exports[`Remix Application Standalone Project Repo --unitTestRunner should gener
640
423
  "
641
424
  `;
642
425
 
643
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 3`] = `
426
+ exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 2`] = `
644
427
  "import { installGlobals } from '@remix-run/node';
645
428
  import '@testing-library/jest-dom/matchers';
646
429
  installGlobals();
647
430
  "
648
431
  `;
649
432
 
650
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 4`] = `
433
+ exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using jest 3`] = `
651
434
  "import { createRemixStub } from '@remix-run/testing';
652
435
  import { render, screen, waitFor } from '@testing-library/react';
653
436
  import Index from '../../app/routes/_index';
@@ -668,27 +451,6 @@ test('renders loader data', async () => {
668
451
  `;
669
452
 
670
453
  exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 1`] = `
671
- "import { createWatchPaths } from '@nx/remix';
672
- import { dirname } from 'path';
673
- import { fileURLToPath } from 'url';
674
-
675
- const __dirname = dirname(fileURLToPath(import.meta.url));
676
-
677
- /**
678
- * @type {import('@remix-run/dev').AppConfig}
679
- */
680
- export default {
681
- ignoredRouteFiles: ['**/.*'],
682
- // appDirectory: "app",
683
- // assetsBuildDirectory: "public/build",
684
- // serverBuildPath: "build/index.js",
685
- // publicPath: "/build/",
686
- watchPaths: () => createWatchPaths(__dirname),
687
- };
688
- "
689
- `;
690
-
691
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
692
454
  "/// <reference types='vitest' />
693
455
  import { defineConfig } from 'vite';
694
456
  import react from '@vitejs/plugin-react';
@@ -719,7 +481,7 @@ export default defineConfig({
719
481
  "
720
482
  `;
721
483
 
722
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 3`] = `
484
+ exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 2`] = `
723
485
  "import { createRemixStub } from '@remix-run/testing';
724
486
  import { render, screen, waitFor } from '@testing-library/react';
725
487
  import Index from '../../app/routes/_index';
@@ -739,7 +501,7 @@ test('renders loader data', async () => {
739
501
  "
740
502
  `;
741
503
 
742
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 4`] = `
504
+ exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 3`] = `
743
505
  "{
744
506
  "extends": "./tsconfig.json",
745
507
  "compilerOptions": {
@@ -772,7 +534,7 @@ exports[`Remix Application Standalone Project Repo --unitTestRunner should gener
772
534
  "
773
535
  `;
774
536
 
775
- exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 5`] = `
537
+ exports[`Remix Application Standalone Project Repo --unitTestRunner should generate the correct files for testing using vitest 4`] = `
776
538
  "import { installGlobals } from '@remix-run/node';
777
539
  import '@testing-library/jest-dom/matchers';
778
540
  installGlobals();
@@ -780,36 +542,14 @@ installGlobals();
780
542
  `;
781
543
 
782
544
  exports[`Remix Application Standalone Project Repo should create the application correctly 1`] = `
783
- "import { createWatchPaths } from '@nx/remix';
784
- import { dirname } from 'path';
785
- import { fileURLToPath } from 'url';
786
-
787
- const __dirname = dirname(fileURLToPath(import.meta.url));
788
-
789
- /**
790
- * @type {import('@remix-run/dev').AppConfig}
791
- */
792
- export default {
793
- ignoredRouteFiles: ['**/.*'],
794
- // appDirectory: "app",
795
- // assetsBuildDirectory: "public/build",
796
- // serverBuildPath: "build/index.js",
797
- // publicPath: "/build/",
798
- watchPaths: () => createWatchPaths(__dirname),
799
- };
800
- "
801
- `;
802
-
803
- exports[`Remix Application Standalone Project Repo should create the application correctly 2`] = `
804
- "import type { MetaFunction } from '@remix-run/node';
805
- import {
545
+ "import {
806
546
  Links,
807
- LiveReload,
808
547
  Meta,
809
548
  Outlet,
810
549
  Scripts,
811
550
  ScrollRestoration,
812
551
  } from '@remix-run/react';
552
+ import type { MetaFunction, LinksFunction } from '@remix-run/node';
813
553
 
814
554
  export const meta: MetaFunction = () => [
815
555
  {
@@ -817,7 +557,20 @@ export const meta: MetaFunction = () => [
817
557
  },
818
558
  ];
819
559
 
820
- export default function App() {
560
+ export const links: LinksFunction = () => [
561
+ { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
562
+ {
563
+ rel: 'preconnect',
564
+ href: 'https://fonts.gstatic.com',
565
+ crossOrigin: 'anonymous',
566
+ },
567
+ {
568
+ rel: 'stylesheet',
569
+ href: 'https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap',
570
+ },
571
+ ];
572
+
573
+ export function Layout({ children }: { children: React.ReactNode }) {
821
574
  return (
822
575
  <html lang="en">
823
576
  <head>
@@ -827,18 +580,21 @@ export default function App() {
827
580
  <Links />
828
581
  </head>
829
582
  <body>
830
- <Outlet />
583
+ {children}
831
584
  <ScrollRestoration />
832
585
  <Scripts />
833
- <LiveReload />
834
586
  </body>
835
587
  </html>
836
588
  );
837
589
  }
590
+
591
+ export default function App() {
592
+ return <Outlet />;
593
+ }
838
594
  "
839
595
  `;
840
596
 
841
- exports[`Remix Application Standalone Project Repo should create the application correctly 3`] = `
597
+ exports[`Remix Application Standalone Project Repo should create the application correctly 2`] = `
842
598
  "import NxWelcome from '../nx-welcome';
843
599
 
844
600
  export default function Index() {
@@ -851,7 +607,7 @@ export default function Index() {
851
607
  "
852
608
  `;
853
609
 
854
- exports[`Remix Application Standalone Project Repo should create the application correctly 4`] = `
610
+ exports[`Remix Application Standalone Project Repo should create the application correctly 3`] = `
855
611
  "import { createRemixStub } from '@remix-run/testing';
856
612
  import { render, screen, waitFor } from '@testing-library/react';
857
613
  import Index from '../../app/routes/_index';
@@ -871,9 +627,36 @@ test('renders loader data', async () => {
871
627
  "
872
628
  `;
873
629
 
874
- exports[`Remix Application Standalone Project Repo should create the application correctly 5`] = `null`;
630
+ exports[`Remix Application Standalone Project Repo should create the application correctly 4`] = `
631
+ "import { vitePlugin as remix } from '@remix-run/dev';
632
+ import { defineConfig } from 'vite';
633
+ import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
634
+
635
+ declare module '@remix-run/node' {
636
+ interface Future {
637
+ v3_singleFetch: true;
638
+ }
639
+ }
640
+
641
+ export default defineConfig({
642
+ root: __dirname,
643
+ plugins: [
644
+ remix({
645
+ future: {
646
+ v3_fetcherPersist: true,
647
+ v3_relativeSplatPath: true,
648
+ v3_throwAbortReason: true,
649
+ v3_singleFetch: true,
650
+ v3_lazyRouteDiscovery: true,
651
+ },
652
+ }),
653
+ nxViteTsPaths(),
654
+ ],
655
+ });
656
+ "
657
+ `;
875
658
 
876
- exports[`Remix Application Standalone Project Repo should create the application correctly 6`] = `
659
+ exports[`Remix Application Standalone Project Repo should create the application correctly 5`] = `
877
660
  "{
878
661
  "root": true,
879
662
  "ignorePatterns": ["!**/*", "build", "public/build"],