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

Commit 14580ec

Browse files
authored
fix(gatsby-theme-docz): remove webpack custom module resolution… (#1275)
* ci: remove gatsby->docz-core dep. Add docz to gatsby example * fix(gatsby-theme-docz): remove custom module resolution
1 parent c0e7109 commit 14580ec

3 files changed

Lines changed: 3 additions & 17 deletions

File tree

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
const fs = require('fs-extra')
2-
const path = require('path')
31
const { Plugin, parseConfig } = require('docz-core')
42

5-
const nodeModules = path.resolve(__dirname, 'node_modules')
6-
const parentNodeModules = path.resolve(__dirname, '../../../node_modules')
7-
83
module.exports = async (params, opts) => {
94
const { stage, actions, getConfig } = params
10-
const hasParentNodeModules = fs.pathExistsSync(parentNodeModules)
115
const args = await parseConfig(opts)
126
const run = Plugin.runPluginsMethod(args.plugins)
137
const config = getConfig()
@@ -20,13 +14,5 @@ module.exports = async (params, opts) => {
2014
})
2115
}
2216

23-
if (hasParentNodeModules) {
24-
actions.setWebpackConfig({
25-
resolve: {
26-
modules: [nodeModules, parentNodeModules],
27-
},
28-
})
29-
}
30-
3117
run('onCreateWebpackConfig', params, stage === 'develop', args, config)
3218
}

core/gatsby-theme-docz/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
"@theme-ui/typography": "^0.2.5",
2525
"babel-plugin-export-metadata": "2.0.0-rc.69",
2626
"copy-text-to-clipboard": "^2.1.0",
27-
"docz": "2.0.0-rc.76",
28-
"docz-core": "2.0.0-rc.75",
2927
"emotion-theming": "^10.0.14",
3028
"fs-extra": "^8.1.0",
3129
"gatsby": "^2.13.27",
@@ -60,7 +58,8 @@
6058
},
6159
"peerDependencies": {
6260
"react": "^16.8.0",
63-
"react-dom": "^16.8.0"
61+
"react-dom": "^16.8.0",
62+
"docz": ">=2.0.0"
6463
},
6564
"gitHead": "74932cd67112bacd1e29780a202d466acdd79535"
6665
}

examples/gatsby/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"serve": "gatsby serve"
2222
},
2323
"dependencies": {
24+
"docz": "^2.0.0-rc.76",
2425
"gatsby": "^2.13.73",
2526
"gatsby-plugin-offline": "^2.2.7",
2627
"gatsby-plugin-sharp": "^2.2.18",

0 commit comments

Comments
 (0)