vercel / next.js

The React Framework
https://nextjs.org
MIT License
126.71k stars 26.94k forks source link

Native Vite Support #13767

Closed Matelasse closed 3 years ago

Matelasse commented 4 years ago

Feature request

Is your feature request related to a problem? Please describe.

Dev-server takes tons of time to spin up, making the overall developer experience worse.

Describe the solution you'd like

Vite is a modern alternative for faster dev-server builds.

Describe alternatives you've considered

Next.js could use the inspiration from Vite and provide its own implementation for a fast dev-server.

Additional context

https://github.com/vitejs/vite

borekb commented 4 years ago

This is a great podcast episode about Vite with Evan You, got me thinking whether this could be married with Next.js 😄. Vite's approach sounded really quite "sound".

rajington commented 4 years ago

Thanks for sharing that podcast, would Vite's use of rollup maybe change how production is built as well? Or maybe something like Snowpack where it's just for dev? There sure are a lot of webpack-based plugins...

Matelasse commented 4 years ago

@Timer any thoughts regarding this feature request? i love both next.js and vite, and i would love to be able to use them both

Janpot commented 4 years ago

@Matelasse Did you see https://github.com/vercel/next.js/issues/15152 ?

Matelasse commented 4 years ago

@Janpot I hadn't seen that. Impressive and hopeful. Is there a way to experiment with wp5 before it's default in next?

Matelasse commented 4 years ago

update: @Janpot webpack v5 is nowhere close to vite in terms of speed

capaj commented 4 years ago

why not switch to vite and drop webpack? That would be simpler to support in the future.

timneutkens commented 4 years ago

update: @Janpot webpack v5 is nowhere close to vite in terms of speed

webpack 5 as of right now is not exactly ready yet. As said in the blogpost caching is not enabled yet.

why not switch to vite and drop webpack? That would be simpler to support in the future.

Vite is in the very early days still. I'd be happy to investigate what it takes for compat and ongoing maintenance for you as part of a support contract, feel free to reach out to enterprise@vercel.com.

zigomir commented 3 years ago

How about now when it's stable? :)