Closed kubk closed 11 months 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
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).
@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
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.
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.
calling yarn install
and yarn dedup
sounds strange btw, sounds like that can be removed completely
Another option is a fork of TSDX called “dts-cli”.
Another option might be Vite. For instance, mobx-keystone uses it.
@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.
Suggest https://github.com/egoist/tsup which depends on rollup and simple configuration.
I'm using Microbundle. It uses rollup under the hood and has a ton of useful features. It's really easy to use.
Well FWIW Lerna is no longer unmaintained at least!
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.
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