Expand my Community achievements bar.

Not able to import any .js file in additional resolvers in Adobe API Mesh

Avatar

Level 1

 

Adobe API Mesh (Local Development setup using Github Codespaces)
Additional resolvers
Trying to import a .js file consisting of a very large mapping that is required in the additional resolver logic.
Whenever trying to import a .js extension file inside the addtional resolver file , be it via commonjs or ES modules it is not supporting it.
It throws an error: 
Error: LintError in File ./resolvers.js: Unexpected use of 'require'. require is
› not supported
Tried importing via both ES modules and CommonJS
"@adobe/aio-cli": "^10.0.0",
LkKu_0-1759735115207.pngLkKu_1-1759735144249.pngLkKu_2-1759735168483.png

 

0 Replies