ov-igloo-ui icon indicating copy to clipboard operation
ov-igloo-ui copied to clipboard

[Bug]: Can't import any Igloo component in NextJS project

Open williamgraver opened this issue 2 years ago • 1 comments

Contact Details

[email protected]

What happened?

Hello,

I'm trying to learn NextJS and I wanted to use one of the Igloo components in my project. It looks like there is a compilation issue due to the way CSS are exported in the different packages in the library. image See thread in the next.js project : https://github.com/vercel/next.js/issues/19936

Here's my repo if you want to reproduce : https://github.com/williamgraver/randomlistpicker-api/blob/master/components/picker.jsx

Component

All

Component Version

latest

Which browsers are you seeing the problem on?

No response

Mobile Device

No response

Relevant log output

No response

williamgraver avatar May 31 '23 12:05 williamgraver

To solve this problem, add thisTranspilePackages to next next.config.js config

const nextConfig = {
  transpilePackages: ['@igloo-ui'],
};
 
module.exports = nextConfig;

franckgaudin avatar Jun 01 '23 15:06 franckgaudin