forked from codebushi/gatsby-starter-dimension-codebushi
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathgatsby-node.ts
33 lines (29 loc) · 797 Bytes
/
gatsby-node.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Implement Gatsby's Node APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/node-apis/
*/
// You can delete this file if you're not using it
import type { GatsbyNode } from 'gatsby'
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'
export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
plugins: [new TsconfigPathsPlugin()],
},
})
}
export const createSchemaCustomization: GatsbyNode['createSchemaCustomization'] = ({ actions }) => {
actions.createTypes(`
type Site {
siteMetadata: SiteMetadata!
}
type SiteMetadata {
title: String!
author: String!
siteUrl: String!
siteImage: String!
description: String!
}
`)
}