create-redmix-app 0.0.1

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 (106) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/dist/create-redmix-app.js +637 -0
  4. package/package.json +57 -0
  5. package/templates/js/.editorconfig +10 -0
  6. package/templates/js/.env +15 -0
  7. package/templates/js/.env.defaults +19 -0
  8. package/templates/js/.env.example +4 -0
  9. package/templates/js/.redwood/README.md +44 -0
  10. package/templates/js/.vscode/extensions.json +14 -0
  11. package/templates/js/.vscode/launch.json +56 -0
  12. package/templates/js/.vscode/settings.json +11 -0
  13. package/templates/js/.vscode/tasks.json +29 -0
  14. package/templates/js/.yarnrc.yml +15 -0
  15. package/templates/js/README.md +122 -0
  16. package/templates/js/api/db/schema.prisma +24 -0
  17. package/templates/js/api/jest.config.js +8 -0
  18. package/templates/js/api/jsconfig.json +41 -0
  19. package/templates/js/api/package.json +9 -0
  20. package/templates/js/api/src/directives/requireAuth/requireAuth.js +22 -0
  21. package/templates/js/api/src/directives/requireAuth/requireAuth.test.js +18 -0
  22. package/templates/js/api/src/directives/skipAuth/skipAuth.js +16 -0
  23. package/templates/js/api/src/directives/skipAuth/skipAuth.test.js +10 -0
  24. package/templates/js/api/src/functions/graphql.js +19 -0
  25. package/templates/js/api/src/graphql/.keep +0 -0
  26. package/templates/js/api/src/lib/auth.js +32 -0
  27. package/templates/js/api/src/lib/db.js +26 -0
  28. package/templates/js/api/src/lib/logger.js +17 -0
  29. package/templates/js/api/src/services/.keep +0 -0
  30. package/templates/js/gitignore.template +24 -0
  31. package/templates/js/graphql.config.js +11 -0
  32. package/templates/js/jest.config.js +8 -0
  33. package/templates/js/package.json +28 -0
  34. package/templates/js/prettier.config.js +18 -0
  35. package/templates/js/redwood.toml +21 -0
  36. package/templates/js/scripts/.keep +0 -0
  37. package/templates/js/scripts/jsconfig.json +54 -0
  38. package/templates/js/scripts/seed.js +27 -0
  39. package/templates/js/web/jest.config.js +8 -0
  40. package/templates/js/web/jsconfig.json +53 -0
  41. package/templates/js/web/package.json +25 -0
  42. package/templates/js/web/public/README.md +43 -0
  43. package/templates/js/web/public/favicon.png +0 -0
  44. package/templates/js/web/public/robots.txt +2 -0
  45. package/templates/js/web/src/App.jsx +16 -0
  46. package/templates/js/web/src/Routes.jsx +20 -0
  47. package/templates/js/web/src/components/.keep +0 -0
  48. package/templates/js/web/src/entry.client.jsx +35 -0
  49. package/templates/js/web/src/index.css +0 -0
  50. package/templates/js/web/src/index.html +15 -0
  51. package/templates/js/web/src/layouts/.keep +0 -0
  52. package/templates/js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +58 -0
  53. package/templates/js/web/src/pages/NotFoundPage/NotFoundPage.jsx +45 -0
  54. package/templates/js/web/vite.config.js +15 -0
  55. package/templates/js/yarn.lock +17991 -0
  56. package/templates/ts/.editorconfig +10 -0
  57. package/templates/ts/.env +15 -0
  58. package/templates/ts/.env.defaults +19 -0
  59. package/templates/ts/.env.example +4 -0
  60. package/templates/ts/.redwood/README.md +44 -0
  61. package/templates/ts/.vscode/extensions.json +14 -0
  62. package/templates/ts/.vscode/launch.json +56 -0
  63. package/templates/ts/.vscode/settings.json +11 -0
  64. package/templates/ts/.vscode/tasks.json +29 -0
  65. package/templates/ts/.yarnrc.yml +15 -0
  66. package/templates/ts/README.md +122 -0
  67. package/templates/ts/api/db/schema.prisma +24 -0
  68. package/templates/ts/api/jest.config.js +8 -0
  69. package/templates/ts/api/package.json +9 -0
  70. package/templates/ts/api/src/directives/requireAuth/requireAuth.test.ts +18 -0
  71. package/templates/ts/api/src/directives/requireAuth/requireAuth.ts +25 -0
  72. package/templates/ts/api/src/directives/skipAuth/skipAuth.test.ts +10 -0
  73. package/templates/ts/api/src/directives/skipAuth/skipAuth.ts +16 -0
  74. package/templates/ts/api/src/functions/graphql.ts +19 -0
  75. package/templates/ts/api/src/graphql/.keep +0 -0
  76. package/templates/ts/api/src/lib/auth.ts +32 -0
  77. package/templates/ts/api/src/lib/db.ts +26 -0
  78. package/templates/ts/api/src/lib/logger.ts +17 -0
  79. package/templates/ts/api/src/services/.keep +0 -0
  80. package/templates/ts/api/tsconfig.json +26 -0
  81. package/templates/ts/gitignore.template +24 -0
  82. package/templates/ts/graphql.config.js +11 -0
  83. package/templates/ts/jest.config.js +8 -0
  84. package/templates/ts/package.json +28 -0
  85. package/templates/ts/prettier.config.js +18 -0
  86. package/templates/ts/redwood.toml +21 -0
  87. package/templates/ts/scripts/.keep +0 -0
  88. package/templates/ts/scripts/seed.ts +27 -0
  89. package/templates/ts/scripts/tsconfig.json +29 -0
  90. package/templates/ts/web/jest.config.js +8 -0
  91. package/templates/ts/web/package.json +25 -0
  92. package/templates/ts/web/public/README.md +43 -0
  93. package/templates/ts/web/public/favicon.png +0 -0
  94. package/templates/ts/web/public/robots.txt +2 -0
  95. package/templates/ts/web/src/App.tsx +22 -0
  96. package/templates/ts/web/src/Routes.tsx +20 -0
  97. package/templates/ts/web/src/components/.keep +0 -0
  98. package/templates/ts/web/src/entry.client.tsx +35 -0
  99. package/templates/ts/web/src/index.css +0 -0
  100. package/templates/ts/web/src/index.html +15 -0
  101. package/templates/ts/web/src/layouts/.keep +0 -0
  102. package/templates/ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +57 -0
  103. package/templates/ts/web/src/pages/NotFoundPage/NotFoundPage.tsx +44 -0
  104. package/templates/ts/web/tsconfig.json +44 -0
  105. package/templates/ts/web/vite.config.ts +16 -0
  106. package/templates/ts/yarn.lock +17991 -0
@@ -0,0 +1,17 @@
1
+ import { createLogger } from '@redmix/api/logger'
2
+
3
+ /**
4
+ * Creates a logger with RedwoodLoggerOptions
5
+ *
6
+ * These extend and override default LoggerOptions,
7
+ * can define a destination like a file or other supported pino log transport stream,
8
+ * and sets whether or not to show the logger configuration settings (defaults to false)
9
+ *
10
+ * @param RedwoodLoggerOptions
11
+ *
12
+ * RedwoodLoggerOptions have
13
+ * @param {options} LoggerOptions - defines how to log, such as redaction and format
14
+ * @param {string | DestinationStream} destination - defines where to log, such as a transport stream or file
15
+ * @param {boolean} showConfig - whether to display logger configuration on initialization
16
+ */
17
+ export const logger = createLogger({})
File without changes
@@ -0,0 +1,24 @@
1
+ .idea
2
+ .DS_Store
3
+ .env*
4
+ !.env.example
5
+ !.env.defaults
6
+ .netlify
7
+ .redwood/*
8
+ !.redwood/README.md
9
+ dev.db*
10
+ dist
11
+ dist-babel
12
+ node_modules
13
+ yarn-error.log
14
+ web/public/mockServiceWorker.js
15
+ web/types/graphql.d.ts
16
+ api/types/graphql.d.ts
17
+ api/src/lib/generateGraphiQLHeader.*
18
+ .pnp.*
19
+ .yarn/*
20
+ !.yarn/patches
21
+ !.yarn/plugins
22
+ !.yarn/releases
23
+ !.yarn/sdks
24
+ !.yarn/versions
@@ -0,0 +1,11 @@
1
+ // This file is used by the VSCode GraphQL extension
2
+
3
+ const { getPaths } = require('@redmix/project-config')
4
+
5
+ /** @type {import('graphql-config').IGraphQLConfig} */
6
+ const config = {
7
+ schema: getPaths().generated.schema,
8
+ documents: './web/src/**/!(*.d).{ts,tsx,js,jsx}',
9
+ }
10
+
11
+ module.exports = config
@@ -0,0 +1,8 @@
1
+ // This the Redwood root jest config
2
+ // Each side, e.g. ./web/ and ./api/ has specific config that references this root
3
+ // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
4
+
5
+ module.exports = {
6
+ rootDir: '.',
7
+ projects: ['<rootDir>/{*,!(node_modules)/**/}/jest.config.js'],
8
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "private": true,
3
+ "workspaces": {
4
+ "packages": [
5
+ "api",
6
+ "web"
7
+ ]
8
+ },
9
+ "devDependencies": {
10
+ "@redmix/core": "0.0.1",
11
+ "@redmix/project-config": "0.0.1"
12
+ },
13
+ "eslintConfig": {
14
+ "extends": "@redmix/eslint-config",
15
+ "root": true
16
+ },
17
+ "engines": {
18
+ "node": "=20.x"
19
+ },
20
+ "prisma": {
21
+ "seed": "yarn rw exec seed"
22
+ },
23
+ "packageManager": "yarn@4.6.0",
24
+ "resolutions": {
25
+ "@storybook/react-dom-shim@npm:7.6.20": "https://verdaccio.tobbe.dev/@storybook/react-dom-shim/-/react-dom-shim-8.0.8.tgz",
26
+ "react-is": "19.0.0-rc-f2df5694-20240916"
27
+ }
28
+ }
@@ -0,0 +1,18 @@
1
+ // https://prettier.io/docs/en/options.html
2
+ /** @type {import('prettier').RequiredOptions} */
3
+ module.exports = {
4
+ trailingComma: 'es5',
5
+ bracketSpacing: true,
6
+ tabWidth: 2,
7
+ semi: false,
8
+ singleQuote: true,
9
+ arrowParens: 'always',
10
+ overrides: [
11
+ {
12
+ files: 'Routes.*',
13
+ options: {
14
+ printWidth: 999,
15
+ },
16
+ },
17
+ ],
18
+ }
@@ -0,0 +1,21 @@
1
+ # This file contains the configuration settings for your Redwood app.
2
+ # This file is also what makes your Redwood app a Redwood app.
3
+ # If you remove it and try to run `yarn rw dev`, you'll get an error.
4
+ #
5
+ # For the full list of options, see the "App Configuration: redwood.toml" doc:
6
+ # https://redwoodjs.com/docs/app-configuration-redwood-toml
7
+
8
+ [web]
9
+ title = "Redwood App"
10
+ port = 8910
11
+ apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
12
+ includeEnvironmentVariables = [
13
+ # Add any ENV vars that should be available to the web side to this array
14
+ # See https://redwoodjs.com/docs/environment-variables#web
15
+ ]
16
+ [api]
17
+ port = 8911
18
+ [browser]
19
+ open = true
20
+ [notifications]
21
+ versionUpdates = ["latest"]
File without changes
@@ -0,0 +1,54 @@
1
+ {
2
+ "compilerOptions": {
3
+ "noEmit": true,
4
+ "esModuleInterop": true,
5
+ "target": "ES2023",
6
+ "module": "Node16",
7
+ "moduleResolution": "Node16",
8
+ "paths": {
9
+ "$api/*": [
10
+ "../api/*"
11
+ ],
12
+ "api/*": [
13
+ "../api/*"
14
+ ],
15
+ "$api/src/*": [
16
+ "../api/src/*",
17
+ "../.redwood/types/mirror/api/src/*"
18
+ ],
19
+ "api/src/*": [
20
+ "../api/src/*",
21
+ "../.redwood/types/mirror/api/src/*"
22
+ ],
23
+ "$web/*": [
24
+ "../web/*"
25
+ ],
26
+ "web/*": [
27
+ "../web/*"
28
+ ],
29
+ "$web/src/*": [
30
+ "../web/src/*",
31
+ "../.redwood/types/mirror/web/src/*"
32
+ ],
33
+ "web/src/*": [
34
+ "../web/src/*",
35
+ "../.redwood/types/mirror/web/src/*"
36
+ ],
37
+ "types/*": [
38
+ "../types/*",
39
+ "../web/types/*",
40
+ "../api/types/*"
41
+ ]
42
+ },
43
+ "typeRoots": [
44
+ "../node_modules/@types"
45
+ ],
46
+ "jsx": "preserve"
47
+ },
48
+ "include": [
49
+ ".",
50
+ "../.redwood/types/includes/all-*",
51
+ "../.redwood/types/includes/web-*",
52
+ "../types"
53
+ ]
54
+ }
@@ -0,0 +1,27 @@
1
+ // import { db } from 'api/src/lib/db'
2
+
3
+ // Manually apply seeds via the `yarn rw prisma db seed` command.
4
+ //
5
+ // Seeds automatically run the first time you run the `yarn rw prisma migrate dev`
6
+ // command and every time you run the `yarn rw prisma migrate reset` command.
7
+ //
8
+ // See https://redwoodjs.com/docs/database-seeds for more info
9
+
10
+ export default async () => {
11
+ try {
12
+ // Create your database records here! For example, seed some users:
13
+ //
14
+ // const users = [
15
+ // { name: 'Alice', email: 'alice@redmix.com' },
16
+ // { name: 'Bob', email: 'bob@redmix.com' },
17
+ // ]
18
+ //
19
+ // await db.user.createMany({ data: users })
20
+
21
+ console.info(
22
+ '\n No seed data, skipping. See scripts/seed.js to start seeding your database!\n'
23
+ )
24
+ } catch (error) {
25
+ console.error(error)
26
+ }
27
+ }
@@ -0,0 +1,8 @@
1
+ // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
2
+
3
+ const config = {
4
+ rootDir: '../',
5
+ preset: '@redmix/testing/config/jest/web',
6
+ }
7
+
8
+ module.exports = config
@@ -0,0 +1,53 @@
1
+ {
2
+ "compilerOptions": {
3
+ "noEmit": true,
4
+ "esModuleInterop": true,
5
+ "target": "ES2022",
6
+ "module": "ESNext",
7
+ "moduleResolution": "Bundler",
8
+ "skipLibCheck": false,
9
+ "rootDirs": [
10
+ "./src",
11
+ "../.redwood/types/mirror/web/src",
12
+ "../api/src",
13
+ "../.redwood/types/mirror/api/src"
14
+ ],
15
+ "paths": {
16
+ "src/*": [
17
+ "./src/*",
18
+ "../.redwood/types/mirror/web/src/*",
19
+ "../api/src/*",
20
+ "../.redwood/types/mirror/api/src/*"
21
+ ],
22
+ "$api/*": [
23
+ "../api/*"
24
+ ],
25
+ "types/*": [
26
+ "./types/*",
27
+ "../types/*"
28
+ ],
29
+ "@redmix/testing": [
30
+ "../node_modules/@redmix/testing/web"
31
+ ]
32
+ },
33
+ "typeRoots": [
34
+ "../node_modules/@types",
35
+ "./node_modules/@types",
36
+ "../node_modules/@testing-library"
37
+ ],
38
+ "types": [
39
+ "jest",
40
+ "jest-dom"
41
+ ],
42
+ "jsx": "preserve"
43
+ },
44
+ "include": [
45
+ "src",
46
+ "config",
47
+ ".storybook/**/*",
48
+ "../.redwood/types/includes/all-*",
49
+ "../.redwood/types/includes/web-*",
50
+ "../types",
51
+ "./types"
52
+ ]
53
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "web",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "browserslist": {
6
+ "development": [
7
+ "last 1 version"
8
+ ],
9
+ "production": [
10
+ "defaults"
11
+ ]
12
+ },
13
+ "dependencies": {
14
+ "@redmix/forms": "0.0.1",
15
+ "@redmix/router": "0.0.1",
16
+ "@redmix/web": "0.0.1",
17
+ "react": "19.0.0-rc-f2df5694-20240916",
18
+ "react-dom": "19.0.0-rc-f2df5694-20240916"
19
+ },
20
+ "devDependencies": {
21
+ "@redmix/vite": "0.0.1",
22
+ "@types/react": "^18.2.55",
23
+ "@types/react-dom": "^18.2.19"
24
+ }
25
+ }
@@ -0,0 +1,43 @@
1
+ # Static Assets
2
+
3
+ Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn rw dev`.
4
+
5
+ > Note: files will _not_ hot reload while the development server is running. You'll need to manually stop/start to access file changes.
6
+
7
+ ### Example Use
8
+
9
+ A file like `favicon.png` will be copied to `/dist/favicon.png`. A folder containing a file such as `static-files/my-logo.jpg` will be copied to `/dist/static-files/my-logo.jpg`. These can be referenced in your code directly without any special handling, e.g.
10
+
11
+ ```
12
+ <link rel="icon" type="image/png" href="/favicon.png" />
13
+ ```
14
+
15
+ and
16
+
17
+ ```
18
+ <img src="/static-files/my-logo.jpg"> alt="Logo" />
19
+ ```
20
+
21
+ ## Best Practices
22
+
23
+ Because assets in this folder are bypassing the javascript module system, **this folder should be used sparingly** for assets such as favicons, robots.txt, manifests, libraries incompatible with Vite, etc.
24
+
25
+ In general, it's best to import files directly into a template, page, or component. This allows Vite to include that file in the bundle when small enough, or to copy it over to the `dist` folder with a hash.
26
+
27
+ ### Example Asset Import with Vite
28
+
29
+ Instead of handling our logo image as a static file per the example above, we can do the following:
30
+
31
+ ```
32
+ import React from "react"
33
+ import logo from "./my-logo.jpg"
34
+
35
+
36
+ function Header() {
37
+ return <img src={logo} alt="Logo" />
38
+ }
39
+
40
+ export default Header
41
+ ```
42
+
43
+ See Vite's docs for [static asset handling](https://vitejs.dev/guide/assets.html)
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow:
@@ -0,0 +1,16 @@
1
+ import { FatalErrorBoundary, RedwoodProvider } from '@redmix/web'
2
+ import { RedwoodApolloProvider } from '@redmix/web/apollo'
3
+
4
+ import FatalErrorPage from 'src/pages/FatalErrorPage'
5
+
6
+ import './index.css'
7
+
8
+ const App = ({ children }) => (
9
+ <FatalErrorBoundary page={FatalErrorPage}>
10
+ <RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
11
+ <RedwoodApolloProvider>{children}</RedwoodApolloProvider>
12
+ </RedwoodProvider>
13
+ </FatalErrorBoundary>
14
+ )
15
+
16
+ export default App
@@ -0,0 +1,20 @@
1
+ // In this file, all Page components from 'src/pages` are auto-imported. Nested
2
+ // directories are supported, and should be uppercase. Each subdirectory will be
3
+ // prepended onto the component name.
4
+ //
5
+ // Examples:
6
+ //
7
+ // 'src/pages/HomePage/HomePage.js' -> HomePage
8
+ // 'src/pages/Admin/BooksPage/BooksPage.js' -> AdminBooksPage
9
+
10
+ import { Router, Route } from '@redmix/router'
11
+
12
+ const Routes = () => {
13
+ return (
14
+ <Router>
15
+ <Route notfound page={NotFoundPage} />
16
+ </Router>
17
+ )
18
+ }
19
+
20
+ export default Routes
File without changes
@@ -0,0 +1,35 @@
1
+ import { hydrateRoot, createRoot } from 'react-dom/client'
2
+
3
+ import App from './App'
4
+ import Routes from './Routes'
5
+
6
+ /**
7
+ * When `#redwood-app` isn't empty then it's very likely that you're using
8
+ * prerendering. So React attaches event listeners to the existing markup
9
+ * rather than replacing it.
10
+ * https://react.dev/reference/react-dom/client/hydrateRoot
11
+ */
12
+ const redwoodAppElement = document.getElementById('redwood-app')
13
+
14
+ if (!redwoodAppElement) {
15
+ throw new Error(
16
+ "Could not find an element with ID 'redwood-app'. Please ensure it " +
17
+ "exists in your 'web/src/index.html' file."
18
+ )
19
+ }
20
+
21
+ if (redwoodAppElement.children?.length > 0) {
22
+ hydrateRoot(
23
+ redwoodAppElement,
24
+ <App>
25
+ <Routes />
26
+ </App>
27
+ )
28
+ } else {
29
+ const root = createRoot(redwoodAppElement)
30
+ root.render(
31
+ <App>
32
+ <Routes />
33
+ </App>
34
+ )
35
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <link rel="icon" type="image/png" href="/favicon.png" />
8
+ </head>
9
+
10
+ <body>
11
+ <!-- Please keep this div empty -->
12
+ <div id="redwood-app"></div>
13
+ </body>
14
+
15
+ </html>
File without changes
@@ -0,0 +1,58 @@
1
+ // This page will be rendered when an error makes it all the way to the top of the
2
+ // application without being handled by a Javascript catch statement or React error
3
+ // boundary.
4
+ //
5
+ // You can modify this page as you wish, but it is important to keep things simple to
6
+ // avoid the possibility that it will cause its own error. If it does, Redwood will
7
+ // still render a generic error page, but your users will prefer something a bit more
8
+ // thoughtful :)
9
+
10
+ // This import will be automatically removed when building for production
11
+ import { DevFatalErrorPage } from '@redmix/web/dist/components/DevFatalErrorPage'
12
+
13
+ export default DevFatalErrorPage ||
14
+ (() => (
15
+ <main>
16
+ <style
17
+ dangerouslySetInnerHTML={{
18
+ __html: `
19
+ html, body {
20
+ margin: 0;
21
+ }
22
+ html * {
23
+ box-sizing: border-box;
24
+ }
25
+ main {
26
+ display: flex;
27
+ align-items: center;
28
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
29
+ text-align: center;
30
+ background-color: #E2E8F0;
31
+ height: 100vh;
32
+ }
33
+ section {
34
+ background-color: white;
35
+ border-radius: 0.25rem;
36
+ width: 32rem;
37
+ padding: 1rem;
38
+ margin: 0 auto;
39
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
40
+ }
41
+ h1 {
42
+ font-size: 2rem;
43
+ margin: 0;
44
+ font-weight: 500;
45
+ line-height: 1;
46
+ color: #2D3748;
47
+ }
48
+ `,
49
+ }}
50
+ />
51
+
52
+ <section>
53
+ <h1>
54
+ <span>Something went wrong</span>
55
+ </h1>
56
+ </section>
57
+ </main>
58
+ ))
@@ -0,0 +1,45 @@
1
+ export default () => (
2
+ <main>
3
+ <style
4
+ dangerouslySetInnerHTML={{
5
+ __html: `
6
+ html, body {
7
+ margin: 0;
8
+ }
9
+ html * {
10
+ box-sizing: border-box;
11
+ }
12
+ main {
13
+ display: flex;
14
+ align-items: center;
15
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
16
+ text-align: center;
17
+ background-color: #E2E8F0;
18
+ height: 100vh;
19
+ }
20
+ section {
21
+ background-color: white;
22
+ border-radius: 0.25rem;
23
+ width: 32rem;
24
+ padding: 1rem;
25
+ margin: 0 auto;
26
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
27
+ }
28
+ h1 {
29
+ font-size: 2rem;
30
+ margin: 0;
31
+ font-weight: 500;
32
+ line-height: 1;
33
+ color: #2D3748;
34
+ }
35
+ `,
36
+ }}
37
+ />
38
+
39
+ <section>
40
+ <h1>
41
+ <span>404 Page Not Found</span>
42
+ </h1>
43
+ </section>
44
+ </main>
45
+ )
@@ -0,0 +1,15 @@
1
+ import dns from 'dns'
2
+
3
+ import { defineConfig } from 'vite'
4
+
5
+ import redwood from '@redmix/vite'
6
+
7
+ // So that Vite will load on localhost instead of `127.0.0.1`.
8
+ // See: https://vitejs.dev/config/server-options.html#server-host.
9
+ dns.setDefaultResultOrder('verbatim')
10
+
11
+ const viteConfig = {
12
+ plugins: [redwood()],
13
+ }
14
+
15
+ export default defineConfig(viteConfig)