-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Craco start and craco build causing different css ordering #57
Comments
Any idea @ndbroadbent ? |
Hi, I can have a look at this. I've opened a new issue in the |
Repository owner
deleted a comment from
StruggleQueen
Jan 18, 2019
Closing this since it's handled in a different repository |
kwajiehao
added a commit
to isomerpages/isomercms-frontend
that referenced
this issue
Jun 17, 2021
This reverts commit 17276df. We are reverting PR #511 because we found out that the outputs of `craco start` and `craco build` were different, resulting in CSS files being imported in an order different to what is intended. The workarounds we found online were convoluted and would introduce unnecessary complexity to the repo. Furthermore, we also found a library (react-app-rewire-alias) which can help us achieve aliasing with CRA as an alternative to Craco. In addition to the bug associated with Craco here, Craco is also overkill since it's a powerful tool which helps users to extend their default CRA configs for webpack among other things. As such, we are reverting this commit and will be attempting to reintroduce aliases at a later date. A sample of how to use react-app-rewire-alias can be found in the vaccinegovsg repo https://github.com/datagovsg/vaccinegovsg-clinic/blob/dev/frontend/config-overrides.js References: - dilanx/craco#57 - DocSpring/craco-antd#12
kwajiehao
added a commit
to isomerpages/isomercms-frontend
that referenced
this issue
Jun 17, 2021
* Revert "style: introduce aliasing, sort imports (#511)" This reverts commit 17276df. We are reverting PR #511 because we found out that the outputs of `craco start` and `craco build` were different, resulting in CSS files being imported in an order different to what is intended. The workarounds we found online were convoluted and would introduce unnecessary complexity to the repo. Furthermore, we also found a library (react-app-rewire-alias) which can help us achieve aliasing with CRA as an alternative to Craco. In addition to the bug associated with Craco here, Craco is also overkill since it's a powerful tool which helps users to extend their default CRA configs for webpack among other things. As such, we are reverting this commit and will be attempting to reintroduce aliases at a later date. A sample of how to use react-app-rewire-alias can be found in the vaccinegovsg repo https://github.com/datagovsg/vaccinegovsg-clinic/blob/dev/frontend/config-overrides.js References: - dilanx/craco#57 - DocSpring/craco-antd#12 * lint: correct linting error
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We recently moved over to craco from react-app-rewired, in conjunction with ant-design. However the css is applied differently when running locally compared to running the completed build. Below is the contents of the craco.config.js file.
test
const CracoAntDesignPlugin = require('craco-antd');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const WebpackBar = require('webpackbar');
module.exports = {
plugins: [{ plugin: CracoAntDesignPlugin }],
webpack: {
plugins: [
new WebpackBar({ profile: true }),
],
},
};
Is this the correct way to ensure that the ant-d styles will be applied last, or have I missed something?
The text was updated successfully, but these errors were encountered: