Skip to content

Commit

Permalink
fix: use csb variable
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Mar 3, 2025
1 parent cb418a4 commit d79acc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nuxi/src/utils/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { createJiti } from 'jiti'
import { listen } from 'listhen'
import { join, relative, resolve } from 'pathe'
import { debounce } from 'perfect-debounce'
import { provider } from 'std-env'
import { joinURL } from 'ufo'

import { clearBuildDir } from '../utils/fs'
Expand Down Expand Up @@ -361,7 +360,8 @@ export function _getDevServerOverrides(listenOptions: Partial<Pick<ListenOptions
defaultOverrides.vite = defu(defaultOverrides.vite, { server: { allowedHosts: [listenOptions.hostname] } })
}

if (listenOptions.public || provider === 'codesandbox') {
// TODO: https://github.com/unjs/std-env/pull/154
if (listenOptions.public || process.env.CODESANDBOX_HOST) {
defaultOverrides.devServer = { cors: { origin: '*' } }
defaultOverrides.vite = { server: { allowedHosts: true } }
}
Expand Down

0 comments on commit d79acc8

Please sign in to comment.