-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Description
Description
Setting up the build and dev mode of separate packages in a monorepo is really challenging. The current amalgamation of vite
, esbuild
, and rollup
doesn't really cut it. Every package has a separate build config with its own resolve.alias, external, and viteStaticCopy setup.
Vite doesn't seem to support merging multiple configurations so the monorepo dependencies must be either:
- Built before the dev script can be started, ideally in a watch mode (which is slow in Vite)
- Aliased inside the Playground's vite.config.ts and configured again like in their original vite.config.js
Proposed solution
Let's explore these tools created specifically for managing monorepos and use one of them here.
- https://bit.dev/
- https://nx.dev/react
- https://rushjs.io/
- https://bazel.build/
- https://turbo.build/pack
- https://buck.build/
Requirements:
- Build all packages in the correct order
- Fast dev mode without prior build, edit any file in the repo and see the outcome right away.
- Dev mode setup should reflect all parts of the build setup like copied static assets. If it works in the dev mode, it should work in the production mode with near-100% certainty.
- Dev mode should use the bundled source and types and also support source maps
Metadata
Metadata
Assignees
Labels
No labels