Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 9ddc90e

Browse files
committed
chore: prioritize gatsbyRoot and default to src
To avoid breaking behavior of changing src behavior we leave it working like before for people that haven't set gatsbyRoot
1 parent f84ea39 commit 9ddc90e

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

core/docz-core/src/config/docz.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const toOmit = ['_', '$0', 'version', 'help']
1212
export const doczRcBaseConfig = {
1313
themeConfig: {},
1414
src: './',
15-
gatsbyRoot: './',
15+
gatsbyRoot: null,
1616
themesDir: 'src',
1717
mdxExtensions: ['.md', '.mdx'],
1818
docgenConfig: {},

core/gatsby-theme-docz/gatsby-config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ module.exports = opts => {
5555
? `${config.paths.root}/node_modules/**/*`
5656
: `${config.paths.root}/node_modules/.cache/**/*`,
5757
],
58-
path: path.resolve(config.paths.root, config.gatsbyRoot),
58+
path: path.resolve(
59+
config.paths.root,
60+
config.gatsbyRoot !== null ? config.gatsbyRoot : config.src
61+
),
5962
},
6063
},
6164
{

0 commit comments

Comments
 (0)