How use adfExport ? (we don't have a way to export this macro)

Hello,

I’m trying to use the adfExport function but I can’t get it to work. I have tried many things, I need your help, my mistake is probably quite silly.

I use this tutorial : https://developer.atlassian.com/platform/forge/change-the-confluence-frontend-with-the-ui-kit/#specify-the-export-view

Edit mode on Confluence :

The result of word export :

My app folder is very basic:

My app/
├── manifest.yml
├── ...{some files}
└── src/
    ├── macroExport.js
    ├── index.js
    ├── fronted/
    │   └── index.jsx
    └── resolvers/
        └── index.js

manifest.yml

modules:
  macro:
    - key: hello-hello-world-macro
      resource: main
      render: native
      resolver:
        function: resolver
      title: hello
      adfExport:
        function: export-key
  function:
    - key: resolver
      handler: index.handler
    - key: export-key
      handler: macroExport.exportFunction
resources:
  - key: main
    path: src/frontend/index.jsx
permissions:
  scopes:
    - read:comment:confluence
app:
  runtime:
    name: nodejs22.x
  id: ari:cloud:ecosystem::app/554280b5-b31e-48b1-bdd2-392ef8b4a1be

src/macroExport.js

import { doc, p } from "@atlaskit/adf-utils/builders";

export const exportFunction = async () => {
  return doc(p("Hello world! Exported message"));
};

src/fronted/index.jsx

import React from "react";
import ForgeReconciler, { Text } from "@forge/react";

const App = () => {
  return (
    <>
      <Text>Number of comments on this page: xxx</Text>
      <Text>Hello world!</Text>
    </>
  );
};

ForgeReconciler.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>
);

src/resolvers/index.js

import Resolver from '@forge/resolver';

const resolver = new Resolver();

resolver.define('getText', (req) => {
  console.log(req);

  return 'Hello, world!';
});

export const handler = resolver.getDefinitions();

src/index.js

export { handler } from './resolvers';

Upping this as I have the exact same problem. Come on, people, someone’s gotta be able to answer here!

It seems the directory is called fronted (shows up twice), but is in the manifest as frontend. I would check things like that, since it seems to be working for others.