diff --git a/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts b/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts index 20991387b4dcb..fe78e85736914 100644 --- a/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/chartsSettings/getComponentInfo.ts @@ -64,13 +64,13 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, - (match, dash, pkg) => `@mui/${pkg}`, + /\/packages\/(.+?)?\/src\/.*/, + (match, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, - (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, + (match, pkg, directory) => `@mui/${pkg}/${directory}`, ); const reExportPackage = [rootImportPath]; diff --git a/scripts/buildApiDocs/gridSettings/getComponentInfo.ts b/scripts/buildApiDocs/gridSettings/getComponentInfo.ts index 62b495ebaa780..9ef4cadcfb305 100644 --- a/scripts/buildApiDocs/gridSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/gridSettings/getComponentInfo.ts @@ -50,13 +50,13 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, - (match, dash, pkg) => `@mui/${pkg}`, + /\/packages\/(.+?)?\/src\/.*/, + (match, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, - (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, + (match, pkg, directory) => `@mui/${pkg}/${directory}`, ); const reExportPackage = [rootImportPath]; diff --git a/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts b/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts index a40e71771a115..136b8727b6e7d 100644 --- a/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts @@ -66,13 +66,13 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, - (match, dash, pkg) => `@mui/${pkg}`, + /\/packages\/(.+?)?\/src\/.*/, + (match, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, - (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, + (match, pkg, directory) => `@mui/${pkg}/${directory}`, ); const reExportPackage = [rootImportPath]; diff --git a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts index 89800438bbac9..fbb3d0028e30f 100644 --- a/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts +++ b/scripts/buildApiDocs/treeViewSettings/getComponentInfo.ts @@ -64,13 +64,13 @@ export function getComponentImports(name: string, filename: string) { const githubPath = toGitHubPath(filename); const rootImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/.*/, - (match, dash, pkg) => `@mui/${pkg}`, + /\/packages\/(.+?)?\/src\/.*/, + (match, pkg) => `@mui/${pkg}`, ); const subdirectoryImportPath = githubPath.replace( - /\/packages\/(grid\/|)(.+?)?\/src\/([^\\/]+)\/.*/, - (match, dash, pkg, directory) => `@mui/${pkg}/${directory}`, + /\/packages\/(.+?)?\/src\/([^\\/]+)\/.*/, + (match, pkg, directory) => `@mui/${pkg}/${directory}`, ); const reExportPackage = [rootImportPath];