You've already forked DocSpace-client
mirror of
https://github.com/ONLYOFFICE/DocSpace-client.git
synced 2026-10-23 13:25:44 +03:00
pnpm installs a package once per peer set, so when an app and @docspace/shared declare different optional peers of a common dependency, the two resolve to different installed copies. Both end up in the bundle, and module state (React contexts, stores) stops being shared. ui-kit's ScrollbarContext split emptied the info panel Share tab, and its ApiContext split crashed selectors. - scripts/split-copies.cjs: finds dependencies that an app and shared resolve to different copies - client: resolve.test.ts checks that Vite's resolve.dedupe collapses every split to the client's copy - sdk: next.config.test.ts checks that the webpack NormalModuleReplacementPlugin does the same, and vitest.config.ts now includes it - common tests: SplitDependencyCopiesTest fails for any other app that has a split copy