Using the newest alpha version 3.0.0-alpha.1 of this library with Next.js results in the following compile error:
error - ./node_modules/@ensdomains/ensjs/dist/esm/functions/batch.d.ts
Module parse failed: Unexpected token (2:8)
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
Earlier versions of the library like 2.1.0 have not caused this issue.
I was able to find a temporary workaround by using next-transpile-modules and modifying the next.config.js file in my project:
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
images: {
domains: ['storage.googleapis.com'],
},
};
const withTM = require('next-transpile-modules')(['@ensdomains/ensjs']); // pass the modules you would like to see transpiled
module.exports = withTM(nextConfig);
Raising this issue for visibility, hopefully it helps with identifying the issue.
Using the newest alpha version
3.0.0-alpha.1
of this library with Next.js results in the following compile error:Earlier versions of the library like
2.1.0
have not caused this issue.I was able to find a temporary workaround by using
next-transpile-modules
and modifying thenext.config.js
file in my project:Raising this issue for visibility, hopefully it helps with identifying the issue.