Skip to content

Repository files navigation

Lab

This repo is a place for me to play around with different tech without needing to create a new git repo everytime.

Vite Monorepo Samples

Samples

Folder Description
/vite-01-monorepo-multiproj - tsconfigs per aspect
- vite/vitest config per aspect
- packages need to build in lib mode for local dev
- hmr only works on code in the app subfolder because the libs are prebuilt
/vite-02-monorepo-monoproj - tsconfigs per workspace
- vite/vitest config per app
- packages dont need vite installed
- hmr works on all the local packages

Possible other things to try

  • Something to try is to tell pnpm to hard link the local deps instead of symlinking them:

    // https://pnpm.io/package_json#dependenciesmetainjected
    "dependenciesMeta": {
      "@acme/ui": {
        "injected": true
      }
    }
  • Try setting auto-install-peers = true in .npmrc

Packages vs apps

This repo contains two types of workspaces:

  • packages: meant to be published to npm and installed,
  • apps: meant to be executed.

Useful Links

About

Just a place for me to put random stuff

Resources

Code of conduct

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages