When building a Next.js project, the @cord-sdk/react package causes a build error due to a global CSS import issue. Next.js restricts importing CSS globally from within node_modules.
Error
error ./node_modules/@cord-sdk/react/dist/mjs/components/helpers/Icon.css.ts.vanilla.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/@cord-sdk/react/dist/mjs/index.js
Import Trace
./node_modules/@cord-sdk/react/dist/mjs/components/helpers/Icon.css.ts.vanilla.css
./node_modules/@cord-sdk/react/dist/mjs/index.js
Behavior
The build fails due to a CSS import restriction in Next.js, as global styles should not be imported from node_modules.
Next.js Version: 13.4.12
@cord-sdk/react Version: Latest version
Ts Node Version: ^10.9.1