※この記事は @akameco さんの 2行でwebpack.config.jsで補完を効かせる方法 のオマージュです。
How
gatsby-config.js
のmodule.exports
の前に次のようなJSDocを追加します。
gatsby-config.js
/**
* @type import('gatsby').GatsbyConfig
*/
module.exports = {};
これで、siteMetadata
やplugins
などのプロパティの補完および型の表示がされるようになります。
Why
@akameco さんの 2行でwebpack.config.jsで補完を効かせる方法 が詳しいので、そちらを参照してください。