Skip to content

Commit

Permalink
fix(eleventy): dynamic import of node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
renet authored and borisdiakur committed Jan 25, 2022
1 parent 496158c commit 162f48f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .eleventy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require('dotenv').config()
const fetch = require('node-fetch')
const eleventyNavigationPlugin = require('@11ty/eleventy-navigation')
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
const markdownIt = require('markdown-it')
Expand Down Expand Up @@ -95,6 +94,7 @@ module.exports = function (eleventyConfig) {

let commits
try {
const fetch = await import('node-fetch')
const res = await fetch(
`https://api.github.com/repos/emdgroup-liquid/liquid/commits?path=${path}`,
{
Expand Down

0 comments on commit 162f48f

Please sign in to comment.