lexoyo so far everything looks great. I am able to integrate data from my headless cms apito.io
I found a problem in the code generation of 11y. The template provided in the script has this in the header
const EleventyFetch = require('@11ty/eleventy-fetch')
module.exports = async function () {
but after the code generation the header changes to
import EleventyFetch from '@11ty/eleventy-fetch'
export default async function () {
and it results a error in the 11ty static site generation
[11ty] Benchmark 1737ms 97% 1× (Data)
./index.11tydata.js[11ty] Copied 6 files / Wrote 2 files in 1.79 seconds (v2.0.1)
[11ty] Watching…
[11ty] Server at http://localhost:8080/
[11ty] File changed: index.html
[11ty] File added: css/index-47e515d68e212a659adf78c14cfaf89181fe56af67a7c634f2508b4c41f74ce5.css
[11ty] File changed: default/website.json
[11ty] File changed: index.11tydata.js
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] Cannot use import statement outside a module (via SyntaxError)
[11ty]
[11ty] Original error stack trace: /Users/diablo/Projects/apito/silex-strapi-11ty/index.11tydata.js:2
[11ty] import EleventyFetch from '@11ty/eleventy-fetch'
[11ty] ^^^^^^
[11ty]
[11ty] SyntaxError: Cannot use import statement outside a module
[11ty] at internalCompileFunction (node:internal/vm:73:18)
Can you point me where do I change this to contribute ?