vue icon indicating copy to clipboard operation
vue copied to clipboard

Migrate from rollup to vite

Open micksi opened this issue 2 years ago • 3 comments

  • minimal solution
  • support tree shaking
  • umd build instead of cjs and iife
  • TODO: check ssr usage is still working

Since rollup-plugin-vue has been deprecated in favor of @vite/plugin-vue, and the general community is working towards vite as the standard built tool for vue libraries and application, I have migrated the library to use vite for the vue3 branch. It is a minimal solution and further configuration might be needed to satisfy all needs. It does however support tree shaking when importing single components in SFC.

micksi avatar May 06 '22 07:05 micksi

This worked great for me 👍 Thanks very much. My bundle size went down by ~80% 😅

philefstat avatar May 20 '22 16:05 philefstat

how do I use this branch as a replacement for the time being? thank you

xeonicca avatar May 22 '22 05:05 xeonicca

@rektdeckard can you give this PR some love 😊 To not break existing setups the package should probably be released as a 2.0 release

micksi avatar May 30 '22 13:05 micksi

We tried to include phosphor-vue in our Vue3/Vite project, and besides generating a massive bundle, the build process was consuming almost 4 GB of memory, causing our CI/CD to crash.

This PR appears to solve both of these problems. Is there a specific reason why this hasn't been merged yet?

dacohen avatar Nov 13 '22 01:11 dacohen

Hey @micksi, @philefstat, @dacohen and everyone else watching here. Apologies for the total disregard to your very real concern about bundle size and tree-shaking. I'll be reviewing and testing this today, hope to be able to push this live soon alongside a slew of other 2.0 updates across our other packages. Thanks for being patient for so long 🥴

rektdeckard avatar Jan 07 '23 20:01 rektdeckard

By the way, We'll be giving a lot more attention to the Phosphor libraries in the near future, have a ton of cleanup and new icons in flight. Hope to push this live within the next week or two as v2.0 (vue2) and v5.0 (vue3). As I am not myself a Vue dev, and we lost our maintainer who initially started this port, we're looking for someone interested in coming on as a maintainer if anyone is interested.

rektdeckard avatar Jan 08 '23 01:01 rektdeckard

Hi there, since I've started working on the library again and there are some new icons in the pipeline, we'll soon be deploying a new major of the it.

You can install a preview by running npm install @phosphor-icons/vue@next

This new version is already based on Vite 4 and takes precautions to guarantee tree-shakability (which is a big problem in the old library).

Note that it's still in alpha and is bound to change, feel free to open any issues you encounter while using the alpha library. And feel free to open any other Issues/PRs if you see something that could be done better. The code for the new version can be found under the next branch.

dnlsndr avatar Feb 04 '23 11:02 dnlsndr