Skip to content

Commit

Permalink
🔀 remix routes CLI command now works with Vite in Remix v2.8.1. Rem…
Browse files Browse the repository at this point in the history
…oved unnecessary remix.config.js. (#6)

* 🔨 Update import type annotation in remix.config.js

* 📦 Update to Remix v2.8.1

* 🧹 removed unnecessary remix.config.js (`remix routes` cli command now works with vite in remix v2.8.1)
  • Loading branch information
OnurGvnc authored Apr 4, 2024
1 parent 8d3c4f3 commit 65fa61c
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 74 deletions.
117 changes: 63 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"contributors:generate": "all-contributors generate"
},
"dependencies": {
"@remix-run/express": "^2.8.0",
"@remix-run/node": "^2.8.0",
"@remix-run/react": "^2.8.0",
"@remix-run/express": "^2.8.1",
"@remix-run/node": "^2.8.1",
"@remix-run/react": "^2.8.1",
"chalk": "^5.3.0",
"clsx": "^2.1.0",
"cross-env": "^7.0.3",
Expand All @@ -47,9 +47,9 @@
"devDependencies": {
"@flydotio/dockerfile": "^0.5.2",
"@playwright/test": "^1.42.1",
"@remix-run/dev": "^2.8.0",
"@remix-run/eslint-config": "^2.8.0",
"@remix-run/testing": "^2.8.0",
"@remix-run/dev": "^2.8.1",
"@remix-run/eslint-config": "^2.8.1",
"@remix-run/testing": "^2.8.1",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
Expand Down Expand Up @@ -97,4 +97,4 @@
"build",
"public/build"
]
}
}
11 changes: 0 additions & 11 deletions remix.config.js

This file was deleted.

12 changes: 10 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
import { vitePlugin as remix } from '@remix-run/dev'
import morgan from 'morgan'
import { remixDevTools } from 'remix-development-tools/vite'
import { flatRoutes } from 'remix-flat-routes'
import { defineConfig, type ViteDevServer } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
import remixConfig from './remix.config'

export default defineConfig({
build: { manifest: true },
plugins: [
morganPlugin(),
remixDevTools(),
tsconfigPaths(),
remix(remixConfig),
remix({
ignoredRouteFiles: ['**/*'],
serverModuleFormat: 'esm',
routes: async defineRoutes => {
return flatRoutes('routes', defineRoutes, {
ignoredRouteFiles: ['**/*.test.{js,jsx,ts,tsx}', '**/__*.*'],
})
},
}),
],
})

Expand Down

0 comments on commit 65fa61c

Please sign in to comment.