Skip to content

Commit

Permalink
Simplify rootDir config to support ts extension
Browse files Browse the repository at this point in the history
  • Loading branch information
frandiox committed Nov 25, 2020
1 parent 14a8e12 commit 4ef9857
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions core/config.cjs
@@ -1,18 +1,8 @@
const fs = require('fs')
const path = require('path')

const viteConfigName = 'vite.config.js'

let rootDir = process.cwd()
if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) {
rootDir = path.resolve(process.cwd(), '..')
if (!fs.existsSync(path.resolve(rootDir, viteConfigName))) {
throw new Error(`Could not find ${viteConfigName}`)
}
}

module.exports = {
rootDir,
rootDir: process.cwd(),
outDir: 'dist',
clientOutDir: 'client',
ssrOutDir: 'ssr',
Expand Down

0 comments on commit 4ef9857

Please sign in to comment.