Files
rules_bun/examples/vite_monorepo/README.md
eric 7139aa3ba2
Some checks failed
CI / test (macos-14, darwin-arm64) (push) Has been cancelled
CI / test (windows-latest, windows) (push) Has been cancelled
CI / test (ubuntu-latest, linux-x64) (push) Has been cancelled
Docs Pages / deploy (push) Failing after 42s
fix: bun_install adds node_modules to each directory
2026-03-06 21:44:15 +01:00

29 lines
899 B
Markdown

# Vite monorepo example
Bun workspace-style example with two Vite applications sharing one root
`bun_install` dependency installation.
Apps:
- `apps/app-a`
- `apps/app-b`
This example also exercises Bun's workspace catalog syntax:
- `workspaces.catalog` provides the default `vite` version referenced as `catalog:`
- `workspaces.catalogs.testing` provides a named catalog referenced as `catalog:testing`
Both apps run `vite` via their own `package.json` scripts while sharing the same
generated `node_modules/` tree.
Run either app with Bazel:
```bash
bazel run //examples/vite_monorepo:app_a_dev -- --host 127.0.0.1 --port 5173 --strictPort
bazel run //examples/vite_monorepo:app_b_dev -- --host 127.0.0.1 --port 5174 --strictPort
```
This example relies on a `bun_install` repository named
`examples_vite_monorepo_node_modules` defined in the repo's `MODULE.bazel` and
`WORKSPACE` files.