Files
wehub-resource-sync a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:56 +08:00

35 lines
829 B
TypeScript

/** Package roots supplied by the host app (see package.json peerDependencies). Lib build must not bundle these. */
export const LIB_PEER_ROOTS = [
"react",
"react-dom",
"react-router",
"react-router-dom",
"react-router-use-location-state",
"@emotion/react",
"@emotion/styled",
"@mui/material",
"@mui/icons-material",
"@mui/system",
"@mui/x-date-pickers",
"@jsonforms/core",
"@jsonforms/material-renderers",
"@jsonforms/react",
"@monaco-editor/react",
"monaco-editor",
"@dnd-kit/core",
"@dnd-kit/sortable",
"react-hook-form",
"@hookform/resolvers",
"yup",
"styled-components",
] as const;
export function isLibPeerExternal(id: string): boolean {
for (const root of LIB_PEER_ROOTS) {
if (id === root || id.startsWith(`${root}/`)) {
return true;
}
}
return false;
}