Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
add leftover refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 13, 2022
1 parent faa6a48 commit 4a12278
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/schema/src/config/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ export default {
/**
* Use vite-node for on-demand server chunk loading
*
* @deprecated use `vite.serverBundler: 'vite-node'`
* @deprecated use `vite.devBundler: 'vite-node'`
*/
viteNode: {
$resolve: (val) => {
val = process.env.EXPERIMENTAL_VITE_NODE ? true : val
if (val === true) {
console.warn('`vite-node` is now enabled by default. You can safely remove `experimental.viteNode` from your config.')
} else if (val === false) {
console.warn('`vite-node` is now enabled by default. To disable it, set `vite.serverBundler` to `legacy` instead.')
console.warn('`vite-node` is now enabled by default. To disable it, set `vite.devBundler` to `legacy` instead.')
}
return val ?? true
}
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ export interface ViteConfig extends ViteUserConfig {
* Bundler for dev time server-side rendering.
* @default 'vite-node'
*/
serverBundler?: 'vite-node' | 'legacy'
devBundler?: 'vite-node' | 'legacy'
}
2 changes: 1 addition & 1 deletion packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as vite from 'vite'
import { join, resolve } from 'pathe'
import { join } from 'pathe'
import type { Nuxt } from '@nuxt/schema'
import type { InlineConfig, SSROptions } from 'vite'
import { logger, isIgnored } from '@nuxt/kit'
Expand Down

0 comments on commit 4a12278

Please sign in to comment.