I am importing a package which has .mjs file inside. I am using nuxt^2.15.8. This is the error I am getting.
ERROR in ./node_modules/aptos/dist/index.mjs 36:58
Module parse failed: Unexpected token (36:58)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| throw new Error(`Invalid hex string: ${hex}`);
| }
> return Uint8Array.from((hexNormalized.match(/.{1,2}/g) ?? []).map((byte) => parseInt(byte, 16)));
| };
|
Is there any support ESM module support in nuxt v2?