SolidZORO / next-plugin-antd-less

🎩 Use Antd (Less) with Next.js v12, Zero Dependency on other Next-Plugins.
MIT License
345 stars 48 forks source link

Compatibility with Ant Pro Components #61

Closed darr1s closed 3 years ago

darr1s commented 3 years ago

Hi there! Thanks for the awesome repo.

I've been trying to make use of this repo to enjoy its auto reload feature when a variable change. However, I find that its compatibility with Ant Design Pro is not as straightforward.

How to re-create

I've made a sample repo based on mkn over here: https://github.com/darrist/mkn-with-pro-components

Current Behavior

  1. pro-* css classes is not being loaded to the app. These classes are provided by .less files within the library, and it should be automatically consumed when importing the component.
  2. image image

Intended Behavior

image

My Assumptions

I am thinking it is possibly related to lacking of less-loader, so that .less files inside the library cannot be loaded correctly.

darr1s commented 3 years ago

Close this for now, I just realize they provide .css as well.

For anyone who wanted to know, it's here: https://procomponents.ant.design/en-US/docs/getting-started

import '@ant-design/pro-form/dist/form.css';
import '@ant-design/pro-table/dist/table.css';
import '@ant-design/pro-layout/dist/layout.css';
YoussefAK commented 2 years ago

Hi @darrist, did you manage to get pro components working by importing .css ? It doesn't seem to be imported in my project.