udp-monorepo-plugin
v1.0.6
Published
A Vite plugin to manage linked dependencies in the UDP monorepo.
Readme
udp-monorepo-plugin
A Vite plugin for the UDP monorepo that improves development ergonomics and production builds by:
- Resolving udp-react-enterprise-component-library modular exports via export-map.json
- Using src/ during dev for udp-react-stencil-component-library to enable fast HMR
- Rewriting stencil component imports to tree-shakeable PascalCase paths on builds
- Providing safe fallbacks when used outside the monorepo (installed via npm)
Install
pnpm add -D udp-monorepo-pluginUsage
Add to your vite.config.ts:
import udpLinkedDependenciesPlugin from 'udp-monorepo-plugin';
export default {
plugins: [udpLinkedDependenciesPlugin()],
};Notes
- In monorepo dev, the plugin aliases packages to their
src. - Outside the monorepo, it falls back to installed package paths.
- Utilities from udp-react-stencil-component-library must be imported from
udp-react-stencil-component-library/core.
License
ISC
