stormy-gold
stormy-gold•15mo ago

How can I run `-r @cypress/instrument-cra` with refine start?

Hello, I'm trying to use @cypress/instrument-cra in my refine project and the library said I have to add -r @cypress/instrument-cra in react-scripts start How can I do this in Refine?
No description
5 Replies
kapa.ai
kapa.ai•15mo ago
Hi @j7.dev. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hello, To modify the react-scripts start command in your refine project, you can use react-app-rewired. Here's how you can do it: 1. First, install react-app-rewired:
npm install react-app-rewired
npm install react-app-rewired
2. Update the scripts in your package.json file:
"scripts": {
"start": "react-app-rewired start -r @cypress/instrument-cra",
"build": "react-app-rewired build",
"eject": "react-scripts eject",
"refine": "refine"
},
"scripts": {
"start": "react-app-rewired start -r @cypress/instrument-cra",
"build": "react-app-rewired build",
"eject": "react-scripts eject",
"refine": "refine"
},
Now, when you run npm start, it will use the -r @cypress/instrument-cra option with react-scripts start. Please note that this solution is based on the information provided in the extracts (https://refine.dev/blog/refine-pixels-6). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai•15mo ago
<@1085258022416285727> kapa.ai is still learning and improving, please let us how it did by reacting below
multiple-amethyst
multiple-amethyst•15mo ago
refine dev -- -r @cypress/instument-crais this not work ? or refine dev -r @cypress/instument-cra if it's throw error, please can you give us output ?
stormy-gold
stormy-gold•15mo ago
@alicanerdurmaz Sorry for the late reply refine dev -- -r @cypress/instument-cra work! Thank you very much
multiple-amethyst
multiple-amethyst•15mo ago
😊