-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Create-react-app Integration Question #134
Comments
Version the app in GitHub or SVN or any other similar repo, then create a script to monitor the changes by updating it to a folder regularly; upon there is an addition or an update of any of the mentioned files trigger a rule to process them as desired and push the changes back to your repo. |
@masanzsa That would work fine for a production build process using webhooks, but not so well for a local development environment while constantly tweaking code and testing the results. I specifically need something for local development that integrates into |
@dsuriano Did you find a solution to this? I'm facing the same issue, I need to use this package with create-react-app, and I would like to have two CSS files to switch between them based on a state prop in both development and production. |
@Shaker-Hamdi Unfortunately my deadlines prevented me from implementing a solution. I ended up manually converting 15-20 files and it helped put me into the habit of writing any future styles with RTL support in mind from the start. My initial thoughts for a solution were something along the lines of writing a small Node script, using {
"scripts": {
"start": "react-scripts start && add-the-new-script-here"
}
} Good luck! And if you stumble across a solution, let me know. |
Here's a solution using craco:
const rtlcss = require('rtlcss');
module.exports = {
style: {
postcss: {
plugins: [rtlcss]
}
}
};
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
},
Done. |
Problem with the above solution is that, RTLCSS requires PostCSS 8. |
Downgrade your rtlcss to use version 2.6.2 |
It doesn't work. |
I'm developing an app that I would like to integrate
rtlcss
into that usescreate-react-app
and its default settings. I'm trying to avoid ejecting or installing a new task manager or build system (ie: grunt/gulp).My goal is to have
rtlcss
run whenever a change is detected within any.scss
or.css
file, in order to simultaneously dev/test without having to manually run thertlcss
from the CLI every time.Does anyone have recommendations on what is the best way to achieve this goal?
The text was updated successfully, but these errors were encountered: