1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +01:00

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">
<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 align="center">
<strong>🍭 My blog built with <a href="http://gatsbyjs.org">Gatsby</a> + TypeScript. Neat.</strong>
@ -34,7 +34,7 @@
- [S3 Deployment](#s3-deployment)
- [🏛 Licenses](#-licenses)
- [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
import { ReactComponent as Logo } from './components/svg/Logo'
;<Logo />
```

View File

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