Skip to content

Commit e12c1e2

Browse files
committed
fix(config): support vite.config.cjs/.cts in builder auto-detection for nitroVite
1 parent ca57c6e commit e12c1e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/config/resolvers/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ async function installPkg(pkg: string, root: string) {
6262
}
6363

6464
function hasNitroViteConfig(options: NitroOptions): boolean {
65-
const configExts = [".ts", ".mts", ".js", ".mjs"];
65+
const configExts = [".ts", ".mts", ".cts", ".js", ".mjs", ".cjs"];
6666
for (const ext of configExts) {
6767
const configPath = resolve(options.rootDir, `vite.config${ext}`);
6868
if (existsSync(configPath)) {

0 commit comments

Comments
 (0)