Skip to content

Conversation

@makivlach
Copy link

By importing the .css file, this package forces to adjust his/her project to using some .css loader. Some frameworks even don't support this behaviour, as in the case of Next.JS: https://nextjs.org/docs/messages/css-npm

The CSS is so simple it can be directly inlined inside the components. That is how I do it in my fork and on my projects.

image

image

@PawelSuwinski
Copy link

In NextJS it also could be solved by transpilation:

// next.config.js
const nextConfig = {
  (...)
  transpilePackages: ['react-admin-color-picker'],
}
module.exports = nextConfig;

https://nextjs.org/docs/advanced-features/compiler#module-transpilation

@makivlach
Copy link
Author

In NextJS it also could be solved by transpilation:

// next.config.js
const nextConfig = {
  (...)
  transpilePackages: ['react-admin-color-picker'],
}
module.exports = nextConfig;

https://nextjs.org/docs/advanced-features/compiler#module-transpilation

True, but I'd consider it rather as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants