mobxjs / mobx

Simple, scalable state management.
http://mobx.js.org
MIT License
27.54k stars 1.77k forks source link

Move away from TSDX #3222

Closed kubk closed 11 months ago

kubk commented 2 years ago

It looks like TSDX is not maintained: https://github.com/jaredpalmer/tsdx/issues/1065

As an alternative I suggest to migrate to plain Rollup. eslint-plugin-mobx is already using Rollup without TSDX. I'd be happy to work on this feature to get better understanding how to build frontend libraries.

UPD: Lerna is also unmaintained: https://github.com/lerna/lerna/issues/2703

mweststrate commented 2 years ago

rollup is great, can definitely recommend! The core lerna stuff is addressed by yarn workspaces as well, so I'd expect we could do without it

urugator commented 2 years ago

One observation from today: If you run yarn install --frozen-lockfile, it still modifies yarn.lock, because it also runs prepare script, which calls yarn install and yarn dedup (without the flags).

kubk commented 2 years ago

@urugator Should I keep this behavior? There is an opinion to not commit lock file at all for libraries: https://dev.to/gajus/stop-using-package-lock-json-or-yarn-lock-3ddi

kubk commented 2 years ago

I've noticed that Mobx uses Yarn 1. Should I continue using it or update to Yarn 2 or 3? I've never used Yarn, only NPM.

mweststrate commented 2 years ago

Absolutely do commit lock files. I still have nightmares from the world before lock files and they were the feature that made npm bearable. Personally I'd still pick yarn 1, I think it pretty perfect and never got clear what problems yarn 2/3 solves. But I'm fine with anything frictionless :). I'd make sure to set up yarn workspaces at least, it should make testing a lot simpler.

mweststrate commented 2 years ago

calling yarn install and yarn dedup sounds strange btw, sounds like that can be removed completely

danielyogel commented 2 years ago

Another option is a fork of TSDX called “dts-cli”.

https://github.com/weiran-zsd/dts-cli

sisp commented 2 years ago

Another option might be Vite. For instance, mobx-keystone uses it.

kubk commented 2 years ago

@sisp Thank you for the suggestion. Recently I've successfully migrated a few of my libraries (like mobx-log) to Rollup bundler + Vite as a playground, so far it works well 👍 When I have time to migrate Mobx away from TSDX, I'll definitely check what benefits Vite may bring.

geekact commented 2 years ago

Suggest https://github.com/egoist/tsup which depends on rollup and simple configuration.

ivandotv commented 2 years ago

I'm using Microbundle. It uses rollup under the hood and has a ton of useful features. It's really easy to use.

ScottAwesome commented 2 years ago

Well FWIW Lerna is no longer unmaintained at least!

tony commented 1 year ago

I've moved my internal projects from tsdx to rollup. Has worked very well - and delighted by how well maintained it is!

Rollup is very simple, well-maintained, fast. It makes you feel in control of your builds. Nice plugin ecosystem as well.