Closed kamronbatman closed 2 years ago
There was a change to the less rule postcss options structure. Does this warrant bumping craco-antd to 2.0?
Hope to see this merge
@huynguyenchk until this gets merged, I have published this under @mrbatman/craco-antd.
@ndbroadbent, anything I can do to help get movement on this? Thank you!
waiting this to be merged
any progress for this ?
Just letting you know. I Change to this. https://github.com/tommie-lie/cra-antd-customization
Now I am not even using craco
I want to use craco (I need it for the webpack aliases). To support less (which antd needs for customisation) I switched from craco-antd to craco-less which seems to be the better maintained plugin.
this is my craco.config.js to get antd to work
//const CracoAntDesignPlugin = require('craco-antd');
const CracoLessPlugin = require("craco-less");
const path = require('path');
module.exports = {
webpack: {
alias: {
"@components": path.resolve(__dirname, "src/components/"),
"@util": path.resolve(__dirname, "src/util/"),
"@pages": path.resolve(__dirname, "src/pages/"),
"@images": path.resolve(__dirname, "src/images/"),
"@context": path.resolve(__dirname, "src/context/"),
"@hooks": path.resolve(__dirname, "src/hooks/"),
},
plugins: {
add: [] /* An array of plugins */,
remove: [] /* An array of plugin constructor's names (i.e. "StyleLintPlugin", "ESLintWebpackPlugin" ) */,
},
configure: {
/* Any webpack configuration options: https://webpack.js.org/configuration */
}
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
modifyVars: {
"@primary-color": "#1DA57A",
"@link-color": "#1DA57A",
"@border-radius-base": "2px",
},
javascriptEnabled: true,
},
},
},
}
]
/*plugins: [
{
plugin: CracoAntDesignPlugin,
options: {
customizeThemeLessPath: path.join(
__dirname,
'./src/antd.customize.less'
),
},
}
]*/
};
Thank you @kamronbatman !
@ndbroadbent, Perhaps you could you extend permissions to allow @kamronbatman to merge pull requests, as he seems to be making valuable contributions to maintaining this repo.
Pls merge it guys, really need it
Looking forward to this merger. Can I offer help? @kamronbatman
Looking forward to this merger. Can I offer help? @kamronbatman
I don't have access to merge. @ndbroadbent will need to do it. I just emailed him. Let's see.
Hi everyone, sorry for the delay, I've just merged this in. I just seem to be having some problems with yarn install
at the moment, so I'm not able to release the new version to NPM:
$ yarn install
yarn install v1.22.17
[1/4] 🔍 Resolving packages...
warning Lockfile has incorrect entry for "jest@27.4.6". Ignoring it.
[2/4] 🚚 Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://artifactory.svc.bird.co/artifactory/api/npm/npm/webpack-dev-server/-/webpack-dev-server-4.7.2.tgz: ETIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/ndbroadbent/code/craco-antd/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Will keep retrying and let you know once it's published.
I'll be happy to do an audit and fix it. This was done in conjunction with Bird when I worked there. I'll fix it and push a new PR.
Ahh I see! Thanks!
Note: resolve-url-loader, sass-loader, and less-loader now default to sourceMap true for development. Decided to lean into this instead of fighting with it. Check their appropriate docs for their reasoning behind this.
Closes #74, #73, #68, #59, #55, #51
Security Warnings: Closes #77, #70, #69, #66, #65, #63, #61, #58, #57, #56, #53