aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
15.87k stars 554 forks source link

"Transforming vite.config.ts" doesn't actually transform anything #1031

Open jirimoravcik opened 1 month ago

jirimoravcik commented 1 month ago

What version of million are you using?

3.0.6

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

-

Describe the Bug

When you run npx million@latest inside a Remix project, initialized with npx create-remix@latest, you'll see:

npx million@latest

Need to install the following packages:
million@3.0.6
Ok to proceed? (y) y
┌  ⚡ Million.js 3.0.6
│
◇  npm detected.
│
◇  Installed million with npm.
│
◆  Detected vite project.
│
◇  Transforming vite.config.ts ─────────╮
│                                       │
│  found existing vite.config.ts file.  │
│                                       │
├───────────────────────────────────────╯
│
└  ✓  You're all set!

but the file vite.config.ts stays unchanged. I looked into the source and found out that modifyConfigFile isn't used anywhere.

What's the expected result?

I think it should be called in the handleConfigFile when a build tool is detected https://github.com/aidenybai/million/blob/main/packages/cli/src/utils/config.ts#L63

Link to Minimal Reproducible Example

-

Participation

github-actions[bot] commented 1 month ago

Thanks for opening this issue! A maintainer will review it soon.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

tobySolutions commented 1 month ago

Hey there, thank you for sharing this @jirimoravcik; can you check your package.json to confirm that Million was installed and then follow this guide: https://million.dev/docs/install.

The team is currently working on new releases and in the upcoming release; this will be attended to. Sorry for the experience.