Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Move away from TSDX #3222

Closed
kubk opened this issue Dec 15, 2021 · 13 comments
Closed

Move away from TSDX #3222

kubk opened this issue Dec 15, 2021 · 13 comments

Comments

@kubk
Copy link
Collaborator

kubk commented Dec 15, 2021

It looks like TSDX is not maintained: jaredpalmer/tsdx#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: lerna/lerna#2703

@mweststrate
Copy link
Member

mweststrate commented Dec 15, 2021

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
Copy link
Collaborator

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
Copy link
Collaborator Author

kubk commented Dec 23, 2021

@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
Copy link
Collaborator Author

kubk commented Dec 23, 2021

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
Copy link
Member

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
Copy link
Member

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

@danielyogel
Copy link

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

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

@sisp
Copy link

sisp commented Feb 9, 2022

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

@kubk
Copy link
Collaborator Author

kubk commented Feb 9, 2022

@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
Copy link

geekact commented Apr 26, 2022

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

@ivandotv
Copy link
Contributor

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

@ScottAwesome
Copy link

Well FWIW Lerna is no longer unmaintained at least!

@tony
Copy link
Contributor

tony commented Nov 6, 2022

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

9 participants