diff --git a/apps/website/gatsby-config.mjs b/apps/website/gatsby-config.mjs index fe1ce7e9e..dd32b3d5b 100644 --- a/apps/website/gatsby-config.mjs +++ b/apps/website/gatsby-config.mjs @@ -7,11 +7,9 @@ // pick it up instead of the JS file. import { getPages } from '@custom/decap'; +import autoload from '@custom/schema/gatsby-autoload'; import { resolve } from 'path'; -// @ts-ignore -import autoload from './node_modules/@custom/schema/build/autoload.mjs'; - const dir = resolve('node_modules/@custom/decap/data/page'); process.env.GATSBY_DRUPAL_URL = diff --git a/apps/website/src/types/gatsby-autoload.d.ts b/apps/website/src/types/gatsby-autoload.d.ts new file mode 100644 index 000000000..6d1525806 --- /dev/null +++ b/apps/website/src/types/gatsby-autoload.d.ts @@ -0,0 +1,3 @@ +declare module '@custom/schema/gatsby-autoload' { + export default Record; +} diff --git a/packages/schema/package.json b/packages/schema/package.json index c9bb788ff..f1bdba1f3 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -15,6 +15,9 @@ ], "./operations": [ "./build/operations.json" + ], + "./gatsby-autoload": [ + "./build/gatsby-autoload.mjs" ] }, "typesVersions": {