diff --git a/core/gatsby-theme-docz/lib/onCreateWebpackConfig.js b/core/gatsby-theme-docz/lib/onCreateWebpackConfig.js index 16d03221b..fd6f51222 100644 --- a/core/gatsby-theme-docz/lib/onCreateWebpackConfig.js +++ b/core/gatsby-theme-docz/lib/onCreateWebpackConfig.js @@ -1,13 +1,7 @@ -const fs = require('fs-extra') -const path = require('path') const { Plugin, parseConfig } = require('docz-core') -const nodeModules = path.resolve(__dirname, 'node_modules') -const parentNodeModules = path.resolve(__dirname, '../../../node_modules') - module.exports = async (params, opts) => { const { stage, actions, getConfig } = params - const hasParentNodeModules = fs.pathExistsSync(parentNodeModules) const args = await parseConfig(opts) const run = Plugin.runPluginsMethod(args.plugins) const config = getConfig() @@ -20,13 +14,5 @@ module.exports = async (params, opts) => { }) } - if (hasParentNodeModules) { - actions.setWebpackConfig({ - resolve: { - modules: [nodeModules, parentNodeModules], - }, - }) - } - run('onCreateWebpackConfig', params, stage === 'develop', args, config) } diff --git a/core/gatsby-theme-docz/package.json b/core/gatsby-theme-docz/package.json index 64100060d..bbaa7d8e7 100644 --- a/core/gatsby-theme-docz/package.json +++ b/core/gatsby-theme-docz/package.json @@ -24,8 +24,6 @@ "@theme-ui/typography": "^0.2.5", "babel-plugin-export-metadata": "2.0.0-rc.69", "copy-text-to-clipboard": "^2.1.0", - "docz": "2.0.0-rc.76", - "docz-core": "2.0.0-rc.75", "emotion-theming": "^10.0.14", "fs-extra": "^8.1.0", "gatsby": "^2.13.27", @@ -60,7 +58,8 @@ }, "peerDependencies": { "react": "^16.8.0", - "react-dom": "^16.8.0" + "react-dom": "^16.8.0", + "docz": ">=2.0.0" }, "gitHead": "74932cd67112bacd1e29780a202d466acdd79535" } diff --git a/examples/gatsby/package.json b/examples/gatsby/package.json index 0f47ce632..093468e7d 100644 --- a/examples/gatsby/package.json +++ b/examples/gatsby/package.json @@ -21,6 +21,7 @@ "serve": "gatsby serve" }, "dependencies": { + "docz": "^2.0.0-rc.76", "gatsby": "^2.13.73", "gatsby-plugin-offline": "^2.2.7", "gatsby-plugin-sharp": "^2.2.18",