Skip to content
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

Extract vue and react version to seperate packages #1126

Open
tobiasdiez opened this issue Sep 22, 2022 · 3 comments
Open

Extract vue and react version to seperate packages #1126

tobiasdiez opened this issue Sep 22, 2022 · 3 comments

Comments

@tobiasdiez
Copy link

Currently, the vue and react parts are simply exported to dist which makes for rather awkward imports such as

import Tags from "@yaireo/tagify/dist/tagify.vue"
import Tags from "@yaireo/tagify/dist/react.tagify"

Instead, I would propose to create new packages that encapsulate these. So for example, one could have

import { Tags } from "@yaireo/vue-tagify"
import { Tags } from "@yaireo/react-tagify"

Also has the advantage that one could properly declare dependencies (e.g. currently one has prop-types as peer dependency, but this is react-specific). (You don't have to split the repository, one common mono-repo approach is to have a packages folder, with each package being a subfolder there, i.e. packages/vue, packages/react and packages/core.)

This was triggered by DefinitelyTyped/DefinitelyTyped#62368 (comment)

@yairEO
Copy link
Owner

yairEO commented Sep 22, 2022

Good suggestion!
I don't even know how to start such a thing. Is there a good article for such a basic setup?

@tobiasdiez
Copy link
Author

I have to admit that I don't have any experience with this myself. But based on what I've seen, you can start with yarn workspaces and setup publishing etc yourself. Or use build tools such as https://lerna.js.org/ which add additional convenience on top of workspaces.

@yairEO
Copy link
Owner

yairEO commented Sep 23, 2022

Yarn is very old and lerna is also very old, I used to work with them many years ago.

Today I work with pnpm and for monorepo you have turborepo. Lerna is very old and nothing something anyone is using for years now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants