When using the magic-sdk v8.0.1 I am getting this warning:

warn  - ./node_modules/magic-sdk/dist/es/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Can someone tell me what is happening here?

1

There are 1 answers

0
Luis De La Hoz On

The problem is related to the magic-sdk's ESM output. You can ignore this warning because it is not considered a bug or make your bundler config to resolve magic-sdk to its CommonJS entrypoint (magic-sdk/dist/cjs/index.js).

A detailed explanation could be found here: https://github.com/magiclabs/magic-js/issues/295