-
-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preact CLI or WMR? #867
Comments
We don't advertise WMR yet, as we feel like there are some remaining friction points to solve when it comes to bigger projects and interop with older dependencies as you have mentioned. We've been using WMR in a couple small to medium projects and we've been very happy with that ourselves, but for bigger projects it's not there yet. The reason At the time of this writing these are the options to pick from:
Reading your post it seems like you'd be most happy with either In either way commonjs or umd-style dependencies are definitely on it's way out. There are often newer ESM alternatives around. So long-term it might be worth it either way to switch to newer ESM alternatives of your dependencies. Whatever you'll go with I'd love to hear more about the specific issues you ran into with |
@Pringels Any dependencies in particular that are giving you trouble when trying to migrate? We do some transformation for CommonJS, but it's not as robust as full ahead-of-time bundlers implement (or Vite's dependency prebundling for that matter). I've migrated a couple projects from preact-cli to WMR and generally the tricky spots are where I had customized preact-cli (ignoring deps, "noParse", etc) - I haven't run into incompatibility with libraries much. Curious to know where its falling over for you. |
@marvinhagemeister @developit thank you for responses! I tried out Most of the issues I had were with libraries that don't support ESM. I also experienced an issue where some packages installed to @developit the biggest incompatibility I have with Thank you both for taking the time to respond. |
I'm a bit unsure as to which build tool I should be using for my preact project. It seems as though the differences are a matter of personal preference: #128 (comment)
But beyond that it isn't really clear to me which tool would be best to adopt in the long-term. I get the impression that
preact-cli
is no longer being actively worked on: preactjs/preact-cli#1579 (comment)My current project was set up using
preact-cli
. I've been happily using it for close to two years now. Lately though I've been experiencing many issues with legacy dependencies. I have to manually pin versions of an increasing number of modules to prevent my builds from breaking.Today I finally tried to migrate the project to
WMR
. The problem is that a huge number of my project's direct and transient dependencies are not all ESM compatible. I understand that the entire JS community is dealing with this problem right now, but this means that I cannot move toWMR
for the foreseeable future.So it almost seems like
preact-cli
is approaching deprecation whileWSR
is too modern to be stable with userland deps 😄Is this an accurate assessment? Does
preact-cli
still have a future? Should I just wait it out?Sorry if this comes across as overly negative. I love using Preact and I truly appreciate the effort you're putting into it!
The text was updated successfully, but these errors were encountered: