3 ms·
Not CRA related, but is it as simple to move an existing Vue2 project to Vite?
by ta-run 4y ago
Not CRA related, but is it as simple to move an existing Vue2 project to Vite?
- brailsafe 4y agoI think it depends, and it's just worth trying. My opinion from a cursory test is that it should be easy to migrate for local dev purposes if you have a single entry point for an app that us essentially one or a series of component trees. The app I work on deoends on an angularjs bootstrapping process, and does some other things that are sort of webpack specific, so we'd need to refactor some bits first. Vue2 should be pretty easy, at least to see the speed improvements locally which is its main pitch afaik
- runarberg 4y agoIt depends. I think web-workers are handled differently, so if one of your dependency uses the webpack way to import a web worker then you might have to ditch that library. There might be other painpoints, but I think most projects migrate pretty easily. I recently migrated a vue2/vue-cli project over to vue3/vite. I had a pretty clear migration path, and did it incrementally over a few months. I needed to ditch a few libraries that didn’t work with either vue3 or vite. Most of the replacements work with both (e.g. vue-composition-api or pinia) so I could keep using vue2 while I migrated and then when the last non-compatible code had been refactored a few months later the final migration was fairly straight forward. The vue-cli switch happened somewhere in the middle of this.