Comments (10)
This is fixed in #75 using my package @mrbatman/craco-antd if you want to stick to using this package.
from craco-antd.
@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.
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.
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",
from craco-antd.
@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.
@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.
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.
@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 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.
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)
- Unable to use custom vars in .less root file HOT 1
- Media queries in customizeTheme
- Not able to install craco-antd, with CRA 4 (npm 8 and node 16.x) and using "@craco/craco": "^6.4.5", HOT 2
- craco 7 with official react-scripts v5 support has been released HOT 3
- Does craco supports antd V5?
- craco test HOT 1
- allow libraryDirectory as option HOT 3
- customizeTheme with files that use JS throws error SyntaxError: Cannot use import statement outside a module
- How to achieve less modules HOT 2
- not support create react app 4.x HOT 3
- Support Craco 6 HOT 2
- options has an unknown property 'noIeCompat' HOT 2
- Double colon Error HOT 3
- Using Ant Design Variables in Styled Components HOT 2
- Using antd less variables in components HOT 1
- craco-antd and react-scripts 5.0.0 HOT 5
- Influence the order/priority of antd css imports HOT 1
- react-scripts 5 and npm 7 HOT 2
- error in webpack5 "Invalid configuration object."
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from craco-antd.