Skip to content

Commit

Permalink
Update dependencies and Node (#642)
Browse files Browse the repository at this point in the history
* Update dependencies and Node

fixed #641

Signed-off-by: Jonas Helming <jhelming@eclipsesource.com>
  • Loading branch information
JonasHelming authored Nov 8, 2024
1 parent c620fb4 commit dc8171f
Show file tree
Hide file tree
Showing 9 changed files with 14,401 additions and 38,644 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
if: github.event_name == 'pull_request_target' && github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Use Node.js 14.x
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 #v3
- name: Use Node.js 20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4
with:
node-version: '14.x'
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
steps:
- name: Checkout website sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4
- name: Use Node.js 14.x
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 #v3
- name: Use Node.js 20.x
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4
with:
node-version: 14.x
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Configure Pages
id: pages
Expand Down
16 changes: 15 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const fetch = require('node-fetch')
const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));

exports.onCreateNode = ({ node, actions }) => {
const { createNodeField } = actions
Expand All @@ -15,6 +15,20 @@ exports.onCreateNode = ({ node, actions }) => {
}
}

exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
resolve: {
fallback: {
stream: require.resolve("stream-browserify"),
http: require.resolve("stream-http"),
https: require.resolve("https-browserify"),
timers: require.resolve("timers-browserify"),
url: require.resolve("url/"),
},
},
});
};

exports.onCreatePage = async ({ page, reporter, actions }) => {
if (page.path === '/') {
try {
Expand Down
Loading

0 comments on commit dc8171f

Please sign in to comment.