Skip to content

Commit

Permalink
resolve #25934 (review)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Feb 19, 2024
1 parent fd6a748 commit 1307cd3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion code/lib/cli/src/automigrate/fixes/vite-config-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const viteConfigFile = {
id: 'viteConfigFile',

async check({ mainConfig, packageManager }) {
const viteConfigPath = await findUp([
let viteConfigPath = await findUp([
'vite.config.js',
'vite.config.mjs',
'vite.config.cjs',
Expand Down Expand Up @@ -45,6 +45,15 @@ export const viteConfigFile = {

const rendererName = frameworkToRenderer[frameworkName as keyof typeof frameworkToRenderer];

if (
!viteConfigFile &&
mainConfig.core?.builder &&
typeof mainConfig.core?.builder !== 'string' &&
mainConfig.core?.builder.options
) {
viteConfigPath = mainConfig.core?.builder.options.viteConfigPath;
}

if (!viteConfigPath && isUsingViteBuilder) {
const plugins = [];

Expand Down

0 comments on commit 1307cd3

Please sign in to comment.