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

Move examples out of workspaces #502

Merged
merged 17 commits into from
Sep 28, 2022
Merged

Move examples out of workspaces #502

merged 17 commits into from
Sep 28, 2022

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Sep 23, 2022

We sometimes have trouble with our examples because of hoisting issues. So, instead of using a monorepo, this PR would turn this repo into a multi-project repo, with no top-level package.json, and instead each example would be stand-alone, and so would packages/builder-vite.

I'm not positive this is the way to go, but it did already suss out a few issues with missing dependencies in both the projects as well as the builder-vite itself.

One thing that's a bit wonky is that since the builder-vite has a completely different node_modules, it can't use any of the packages that are installed in the example, like preact and the vite preact plugin in the preact example. I added them as dev deps to the builder, which works fine I think. It's a downside, but on the other hand it makes these deps a little bit explicit without bloating the dependencies for users.

Moving the examples out of the monorepo means we won't have a top-level
project to build these all from anymore.  Maybe we can find a way to add it back in later, though.
This allows each example to be its own project, and avoids mixing dependencies between all of them.
@IanVS IanVS force-pushed the remove-examples-from-workspaces branch 3 times, most recently from 1a31b59 to 3ac2a74 Compare September 23, 2022 19:36
@IanVS IanVS force-pushed the remove-examples-from-workspaces branch from 3ac2a74 to a86e59d Compare September 23, 2022 19:39
@IanVS IanVS force-pushed the remove-examples-from-workspaces branch from fc112da to a8f9328 Compare September 23, 2022 20:07
@IanVS IanVS force-pushed the remove-examples-from-workspaces branch from b853115 to 6ecdd8c Compare September 23, 2022 21:38
@IanVS IanVS force-pushed the remove-examples-from-workspaces branch from 65707dd to f98a063 Compare September 23, 2022 21:52
This was referenced Sep 24, 2022
@IanVS IanVS merged commit bba8739 into main Sep 28, 2022
@IanVS IanVS deleted the remove-examples-from-workspaces branch September 28, 2022 01:15
IanVS added a commit that referenced this pull request Sep 28, 2022
This cherry-picks some commits from @heykc's PR #469, but puts them on top of #502, so that we can have multiple versions of vue examples that don't conflict with each other in the monorepo, which was one of the challenges in the original PR.

This also attempts to read the version of `vue` from the user's package.json, determine whether it's 2.6 or 2.7, and use the appropriate vite plugin, as suggested by @Djaler.
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

Successfully merging this pull request may close these issues.

2 participants