nicoalbanese / kirimase

Build full-stack Next.js apps, incredibly fast
https://kirimase.dev
MIT License
2.37k stars 107 forks source link

Init fails, due to next.config not having the expected file extension. #186

Open gaurangrshah opened 2 months ago

gaurangrshah commented 2 months ago

Config File

{
  "hasSrc": true,
  "packages": [
    "shadcn-ui",
    "drizzle"
  ],
  "preferredPackageManager": "npm",
  "t3": false,
  "alias": "@",
  "analytics": true,
  "rootPath": "src/",
  "componentLib": "shadcn-ui",
  "driver": "sqlite",
  "provider": "turso",
  "orm": "drizzle"
}

Describe the bug when running npx kirimase init the cli is unable to find a next.config.mjs file. I currently has a legacy dependency (contentlayer) in this project and because of it we are forced to use the .cjs extension instead.

To Reproduce Steps to reproduce the behavior:

  1. Rename next.config.mjs to next.config.cjs
  2. Run npx kirimase init on the project root
  3. See error

Expected behavior I hope that the cli would be robust enough to able to check to see if any next-config is available and apply the changes to that file regardless of the extension used in the project.

Screenshots ~image

Desktop (please complete the following information):

Additional context n/a