LoginSignup
4
4

More than 3 years have passed since last update.

2行でgatsby-config.jsで補完を効かせる方法

Posted at

※この記事は @akameco さんの 2行でwebpack.config.jsで補完を効かせる方法 のオマージュです。

How

gatsby-config.jsmodule.exportsの前に次のようなJSDocを追加します。

gatsby-config.js
/**
 * @type import('gatsby').GatsbyConfig
 */
module.exports = {};

これで、siteMetadatapluginsなどのプロパティの補完および型の表示がされるようになります。

Why

@akameco さんの 2行でwebpack.config.jsで補完を効かせる方法 が詳しいので、そちらを参照してください。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4