Skip to content

Commit 5679142

Browse files
erquhartm-allanson
authored andcommitted
improvement(gatsby-plugin-netlify-cms): watch cms files (#11136)
1 parent 7d53214 commit 5679142

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/gatsby-plugin-netlify-cms/src/gatsby-node.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,13 @@ exports.onCreateWebpackConfig = (
142142
*/
143143
mode: `none`,
144144
optimization: {},
145+
devtool: stage === `develop` ? `cheap-module-source-map` : `source-map`,
146+
}
147+
148+
if (stage === `develop`) {
149+
webpack(config).watch({}, () => {})
150+
} else {
151+
webpack(config).run()
145152
}
146-
webpack(config).run()
147153
}
148154
}

0 commit comments

Comments
 (0)