Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why importing a .css file? #10

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

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