Skip to content

Commit

Permalink
refactor: remove configPath in false condition branches (vitejs#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsonet committed May 10, 2020
1 parent 87ee998 commit bf4d394
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,17 +165,11 @@ export async function resolveConfig(
if (configPath) {
resolvedPath = path.resolve(process.cwd(), configPath)
} else {
const jsConfigPath = path.resolve(
process.cwd(),
configPath || 'vite.config.js'
)
const jsConfigPath = path.resolve(process.cwd(), 'vite.config.js')
if (await fs.pathExists(jsConfigPath)) {
resolvedPath = jsConfigPath
} else {
const tsConfigPath = path.resolve(
process.cwd(),
configPath || 'vite.config.ts'
)
const tsConfigPath = path.resolve(process.cwd(), 'vite.config.ts')
if (await fs.pathExists(tsConfigPath)) {
isTS = true
resolvedPath = tsConfigPath
Expand Down

0 comments on commit bf4d394

Please sign in to comment.