GraphQL 쿼리

AEM은 클라이언트 정의 GraphQL 쿼리를 지원하지만 지속 GraphQL 쿼리를 사용하는 것이 AEM 모범 사례입니다.

Webpack 5+

AEM Headless JS SDK에 기본적으로 Webpack 5+에 포함되지 않은 util에 대한 종속성이 있습니다. Webpack 5+를 사용 중인데 다음 오류가 표시됩니다.

Compiled with problems:
× ERROR in ./node_modules/@adobe/aio-lib-core-errors/src/AioCoreSDKErrorWrapper.js 12:13-28
Module not found: Error: Can't resolve 'util' in '/Users/me/Code/wknd-headless-examples/node_modules/@adobe/aio-lib-core-errors/src'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "util": require.resolve("util/") }'
    - install 'util'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "util": false }

package.json 파일에 다음 devDependencies을(를) 추가합니다.

  "devDependencies": {
    "buffer": "npm:buffer@^6.0.3",
    "crypto": "npm:crypto-browserify@^3.12.0",
    "http": "npm:stream-http@^3.2.0",
    "https": "npm:https-browserify@^1.0.0",
    "stream": "npm:stream-browserify@^3.0.0",
    "util": "npm:util@^0.12.5",
    "zlib": "npm:browserify-zlib@^0.2.0"
  },

npm install을(를) 실행하여 종속성을 설치하십시오.

recommendation-more-help