gsoft-inc / ov-igloo-ui

Officevibe design system
https://igloo.officevibe.design
Apache License 2.0
19 stars 6 forks source link

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

Open williamgraver opened 1 year ago

williamgraver commented 1 year ago

Contact Details

william.graver@gsoft.com

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

franckgaudin commented 1 year ago

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

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

module.exports = nextConfig;