Giter Site home page Giter Site logo

Comments (10)

kamronbatman avatar kamronbatman commented on August 23, 2024 6

This is fixed in #75 using my package @mrbatman/craco-antd if you want to stick to using this package.

from craco-antd.

nerdess avatar nerdess commented on August 23, 2024 1

@flyingcrp I fixed the issue by removing craco-antd and switching to craco-less. Check out my comment here which also includes my craco.config.js: #75

from craco-antd.

nerdess avatar nerdess commented on August 23, 2024 1

looks like https://www.npmjs.com/package/@mrbatman/craco-antd is gone and has been merged into the initial craco-antd package. so using this package is fine again :)

from craco-antd.

flyingcrp avatar flyingcrp commented on August 23, 2024

got the same error in cra5 and craco6.x

"antd": "^4.18.4",
"@craco/craco": "^6.4.3",
"craco-antd": "^1.19.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "5.0.0",

image

from craco-antd.

flyingcrp avatar flyingcrp commented on August 23, 2024

@flyingcrp I fixed the issue by removing craco-antd and switching to craco-less. Check out my comment here which also includes my craco.config.js: #75

yes! thanks for your reply . i got it

from craco-antd.

nerdess avatar nerdess commented on August 23, 2024

@kamronbatman switched back to your version until your PR gets merged.

One odd thing I noticed: When I change a variable in antd.customize.less and restart my app so that the new variables get picked up they don't. I need to rename the file antd.customize.less into sth else (e.g. antd.customize1.less), change the theme path in craco.config.js to the renamed filename > restart > only then the variables get picked up. It seems like some kind of caching issue (in webpack?? in craco??).

Afaik there is no way in order to pick up changed les variables than to restart the server. But having to also rename the file is really crazy :D Any hints would be cool in case you have the same isssue.

from craco-antd.

kamronbatman avatar kamronbatman commented on August 23, 2024

I have the same problem. I ended up getting rid of craco-antd and craco-less because I could not find a solution.

from craco-antd.

nerdess avatar nerdess commented on August 23, 2024

@kamronbatman hm, how are you embedding antd in your create-react-app then? afaik antd needs less for customisation (which is a shame since i prefer sass). I really don't want to eject the project either.

from craco-antd.

kamronbatman avatar kamronbatman commented on August 23, 2024

@kamronbatman hm, how are you embedding antd in your create-react-app then? afaik antd needs less for customisation (which is a shame since i prefer sass). I really don't want to eject the project either.

Great question. I ended up using craco and less-loader directly. Then making a less file, importing the antd less files, making my changes, then importing that file manually into the root App.tsx.

from craco-antd.

tdevthairun avatar tdevthairun commented on August 23, 2024

looks like https://www.npmjs.com/package/@mrbatman/craco-antd is gone and has been merged into the initial craco-antd package. so using this package is fine again :)

it not work for me

from craco-antd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.