Skip to content

Commit

Permalink
fix(rsc): try fixing dev (#10202)
Browse files Browse the repository at this point in the history
Based on #10201, it looks like
CI wasn't correctly catching the errors in the [Vite v5
upgrade](#10197) as far as RSC
goes at least. Had some success with configuring this plugin locally.
  • Loading branch information
jtoar authored Mar 11, 2024
1 parent 4fd86e8 commit edbbf7b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vite/src/devFeServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createServerAdapter } from '@whatwg-node/server'
import express from 'express'
import type { ViteDevServer } from 'vite'
import { createServer as createViteServer } from 'vite'
import { cjsInterop } from 'vite-plugin-cjs-interop'

import type { RouteSpec } from '@redwoodjs/internal/dist/routes'
import { getProjectRoutes } from '@redwoodjs/internal/dist/routes'
Expand Down Expand Up @@ -50,6 +51,11 @@ async function createServer() {
// can take control
const vite = await createViteServer({
configFile: rwPaths.web.viteConfig,
plugins: [
cjsInterop({
dependencies: ['@redwoodjs/**'],
}),
],
server: { middlewareMode: true },
logLevel: 'info',
clearScreen: false,
Expand Down

0 comments on commit edbbf7b

Please sign in to comment.