diff --git a/docs/code-block-loader.js b/docs/code-block-loader.js index 98d519df31e6..7a58e42ec00b 100644 --- a/docs/code-block-loader.js +++ b/docs/code-block-loader.js @@ -61,9 +61,10 @@ async function webpackLoader(content, map, meta) { const findExactPath = (moduleName, imported) => { let modulePath; CATEGORIES.forEach((category) => { - const docsPath = path.resolve(__dirname, "..", "api-docs", "public", category, `${moduleName}.${imported}.html`); + const componentPath = `${category}/${moduleName}.${imported}.html`; + const docsPath = path.resolve(__dirname, "..", "api-docs", "public", componentPath); if (fs.existsSync(docsPath)) { - modulePath = category + "/" + moduleName + "." + imported + ".html"; + modulePath = componentPath } }) return modulePath;