diff --git a/packages/gatsby-dev-cli/src/__tests__/watch.js b/packages/gatsby-dev-cli/src/__tests__/watch.js index 1e020a8e64134..68326929526c1 100644 --- a/packages/gatsby-dev-cli/src/__tests__/watch.js +++ b/packages/gatsby-dev-cli/src/__tests__/watch.js @@ -262,6 +262,9 @@ const monoRepoPackages = [ `gatsby-source-shopify`, `gatsby-source-wikipedia`, `gatsby-source-wordpress`, + `gatsby-theme-blog`, + `gatsby-theme-blog-core`, + `gatsby-theme-notes`, `gatsby-telemetry`, `gatsby-transformer-asciidoc`, `gatsby-transformer-csv`, @@ -312,7 +315,7 @@ jest.mock(`../utils/promisified-spawn`, () => { } }) -describe(`dependency changs`, () => { +describe(`dependency changes`, () => { const { publishPackage } = require(`../local-npm-registry/publish-package`) const { installPackages } = require(`../local-npm-registry/install-packages`) const { checkDepsChanges } = require(`../utils/check-deps-changes`) diff --git a/packages/gatsby-dev-cli/src/watch.js b/packages/gatsby-dev-cli/src/watch.js index 71852aca06d93..cd5930f6ddbf1 100644 --- a/packages/gatsby-dev-cli/src/watch.js +++ b/packages/gatsby-dev-cli/src/watch.js @@ -151,6 +151,10 @@ async function watch( return } + const allPackagesIgnoringThemesToWatch = allPackagesToWatch.filter( + pkgName => !pkgName.startsWith(`gatsby-theme`) + ) + const ignored = [ /[/\\]node_modules[/\\]/i, /\.git/i, @@ -159,7 +163,9 @@ async function watch( /[/\\]__mocks__[/\\]/i, /\.npmrc/i, ].concat( - allPackagesToWatch.map(p => new RegExp(`${p}[\\/\\\\]src[\\/\\\\]`, `i`)) + allPackagesIgnoringThemesToWatch.map( + p => new RegExp(`${p}[\\/\\\\]src[\\/\\\\]`, `i`) + ) ) const watchers = _.uniq( allPackagesToWatch