9 ms·
React Context HMR still has problem. Due to this problem, I think nextjs still the better choice for react dev. Maybe vite supports too many frameworks, do not
by wener 4y ago
React Context HMR still has problem. Due to this problem, I think nextjs still the better choice for react dev. Maybe vite supports too many frameworks, do not have enough time to handle the react problems.
[1]: https://github.com/vitejs/vite/issues/3301 https://github.com/vitejs/vite/issues/3301
- gedy 4y agoNextjs and vite are not really comparable, they are two different things. NextJS is an application framework, vite is a dev/build tool. (With that said, I'd love to see Next use Vite, but iirc the webpack dev works for Vercel [Nextjs parent] now)
- no_wizard 4y agoThey seem to be very heavily invested in the long game that is SWC[0][1] which will eventually replace webpack as a whole as well [0]: https://swc.rs/ https://swc.rs/ [1]: https://nextjs.org/docs/advanced-features/compiler https://nextjs.org/docs/advanced-features/compiler
- _fat_santa 4y agoAt this point we know that Webpack is dead. Unless there is a new release that rewrites it in Rust or Go and makes it comparable in speed to Vite/SWC which will never happen. The two different approaches seem to be either going with SWC or Vite. I'm honestly not sure which one will prevail, or if they will both co-exist, splitting the previous market share taken up by Webpack.
- wener 4y agoBut, vite is working on to become the next nextjs, like ssr, isg etc. Nextjs only support react, so it's easier to leverage the react's ability to do these. When there is ssr, there is runtime, more than just a dev/build tool.
- benmccann 4y agoIt sounds like you might have some misunderstanding. You can write SSR applications with Vite, but each framework or application is responsible for the rendering. There isn't really such a thing as an SSR runtime in Vite. It will run code on the development server in SSR mode, but all it does is make sure it's picking up code updates and passes it through to Node.js.
- simlevesque 4y ago> vite is working on to become the next nextjs, like ssr, isg etc That does not seem to be the truth. They offer a very different product than Next.
- rk06 4y agoVite is framework agnostic. Framework specific work is spearheaded by framework specific community or core authors in some cases (solid, astro) React falters because there are not many community contributing towards react integration. Note: Vite team has done their job for react, but react itself has many concerns particularly due to commonjs that a dedicated person (or team) is needed for react
- ramesh31 4y ago>Vite is framework agnostic. Framework specific work is spearheaded by framework specific community or core authors in some cases (solid, astro) This is like saying NPM is language agnostic. Sure, technically it is. But we all know what it was built for and what the community is geared toward.
- benmccann 4y agoFramework-agnosticism is not an afterthought in Vite, but has been there from the beginning. Svelte has gone all-in with Vite. Go to svelte.dev and the homepage instructs you to create a new project using Vite. We've never run into any problems with things being built for a specific framework in Vite.
- __ryan__ 4y ago…Vue in this case?
- ramesh31 4y agoYes.
- FinalBriefing 4y agoIt's a JavaScript bundler. If a framework is doing weird stuff with imports, or using legacy module builds, that's on the framework to fix...or not. Angular is the same way, it has its own compiler and relies on custom build-time code to work. That's also why it isn't picked up by a lot of newer build tools that generally just work with normal JS.
- nilsbunger 4y agoThat issue is disappointing. It's an important issue for making React work, it's been open for over a year, and there isn't any comment from someone who works on vite or the plug-in.