chaosharmonic
chaosharmonic4w ago

`deno bundle` and React Router

Is bundle intended to fully cover projects would normally require third party build tools? Asking primarily because I ran into a snag trying to migrate a React project off of Vite -- that snag appearsto involve React Router -- which, itself, uses Vite as a dev dependency. (Tangentially, if I keep using Vite, its syntax parsing throws errors on attempting to use text imports)
6 Replies
marvinh.
marvinh.4w ago
The deno bundle command in its current form is not a replacement for something like vite. It only does bundling like merging js files together. There is no dev server, no HMR and no plugin support.
chaosharmonic
chaosharmonicOP4w ago
Got it. Is that just an immediate-term statement about its experimental status, or also a medium- to long-term one about its design?
marvinh.
marvinh.4w ago
time will tell, but stay with vite for the foreseeable future.
jeff.hykin
jeff.hykin2w ago
Friendly note @marvinh., (from someone who loves the old and new deno bundle)
The deno bundle command in its current form is not a replacement for something like vite.
Could be definitely be more clearly communicated on the site docs and in the 2.4 announcement. Ex [current docs]:
This tool is useful for deploying or distributing a project as a single optimized JS file
Could continue with:
, but is not currently intended as a replacement for complex or interactive build tools such as Vite or Webpack.
Just half a sentence could go a long way for setting up correct expectations..
marvinh.
marvinh.2w ago
GitHub
Feedback deno bundle · Issue #2441 · denoland/docs
jeff.hykin — 16:19 Friendly note @marvinh., (from someone who loves the old and new deno bundle) The deno bundle command in its current form is not a replacement for something like vite. Could be d...
chaosharmonic
chaosharmonicOP2d ago
Related question: if Vite isn't resolving text imports, that's still potentially a problem, right? I know it might just be that this is still an unstable feature

Did you find this page helpful?