1
0
Fork 0

build fix

This commit is contained in:
Matthias Kretschmann 2023-08-17 13:17:09 +01:00
parent c20c7a1fc1
commit 1d71df9b92
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 20 additions and 13 deletions

View File

@ -1,5 +1,5 @@
<p align="center"> <p align="center">
<a href="https://kremalicious.com"><img src="https://raw.githubusercontent.com/kremalicious/portfolio/main/src/images/github-header.png" /></a> <a href="https://kremalicious.com"><img src="https://raw.githubusercontent.com/kremalicious/portfolio/main/public/github-header.png" /></a>
</p> </p>
<p align="center"> <p align="center">
<strong>🍭 My blog built with <a href="http://gatsbyjs.org">Gatsby</a> + TypeScript. Neat.</strong> <strong>🍭 My blog built with <a href="http://gatsbyjs.org">Gatsby</a> + TypeScript. Neat.</strong>
@ -34,7 +34,7 @@
- [S3 Deployment](#s3-deployment) - [S3 Deployment](#s3-deployment)
- [🏛 Licenses](#-licenses) - [🏛 Licenses](#-licenses)
- [Posts](#posts) - [Posts](#posts)
- [Photos & images](#photos--images) - [Photos \& images](#photos--images)
--- ---
@ -143,7 +143,6 @@ All SVG assets under `src/images/` will be converted to React components with th
```jsx ```jsx
import { ReactComponent as Logo } from './components/svg/Logo' import { ReactComponent as Logo } from './components/svg/Logo'
;<Logo /> ;<Logo />
``` ```

View File

@ -1,4 +1,5 @@
import type { GatsbyNode } from 'gatsby' import type { GatsbyNode } from 'gatsby'
import webpack from 'webpack'
import { createExif } from './gatsby/createExif' import { createExif } from './gatsby/createExif'
import { createMarkdownFields } from './gatsby/createMarkdownFields' import { createMarkdownFields } from './gatsby/createMarkdownFields'
import { import {
@ -158,14 +159,21 @@ export const onPostBuild: GatsbyNode['onPostBuild'] = async ({ graphql }) => {
return Promise.resolve() return Promise.resolve()
} }
export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] = ({ export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] =
actions async ({ actions }) => {
}) => { actions.setWebpackConfig({
actions.setWebpackConfig({ plugins: [
resolve: { new webpack.NormalModuleReplacementPlugin(/node:/, (resource) => {
fallback: { resource.request = resource.request.replace(/^node:/, '')
util: false })
],
resolve: {
fallback: {
util: false,
crypto: false,
path: false,
url: false
}
} }
} })
}) }
}