Skip to content

Use Monorepo tools #148

@adamziel

Description

@adamziel

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.

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions