a tool that allows for easy overriding of create-react-app webpack configs without having to eject
Questions tagged [react-app-rewired]
88 questions
1
vote
1 answer
React app on Vercel - 404 not found error after adding Web Worker
I have my React app deployed to Vercel, and it was working until I added a web worker and a background task.
The app still builds and deploys with no error, but when I visit the url I get a 404 not found error.
It still runs fine locally as…

Louis Sankey
- 481
- 8
- 26
1
vote
0 answers
Can react-app-rewired be used to conditionally configure peer dependencies
I am trying to modify an SPA created via CRA typescript template. Modification is such that the project must be able to generate SPA and also a library through different scripts(npm run build, npm run build-library). While adding configuration to…
1
vote
0 answers
react-scripts 2.1.1 update fails
My task is to update "react-scripts" 2.1.1 in ReactJS app to something newer.
what I did:
1.
clone clean project
update
"react-scripts": "2.1.1" -> "2.1.8"
npm install
npm start
First problem, which I faced:
frontend@2.0.0 start…

Jevgeni Zolotarjov
- 11
- 1
1
vote
1 answer
Calling webpack.ignorePlugin (to tree-shake Moment.js locales) with CRA + rescripts
I am using CRA + with rescripts
I want to tree-shake Moment.js locales, exactly the same way as shown in ignorePlugin Webpack docs:
new webpack.IgnorePlugin({
checkResource (resource) {
// do something with resource
return true|false;
…

Michal Kurz
- 1,592
- 13
- 41
1
vote
2 answers
Webpack dev server - Concat CSS files into one file on file save
The problem statement
I have a requirement in a legacy React application which has multiple scss files in a particular directory. The CSS is not imported at the component level, the application uses gulp as a build system where it watches for file…

Harsha Venkataramu
- 2,887
- 1
- 34
- 58
1
vote
1 answer
react-app-rewired customise default start url
I have installed react-app-rewired.
In the package.json I have set
"scripts": {
"start": "react-app-rewired start --scripts-version react-scripts",
}
When I run
npm start
It opens a browser window on localhost:3000
I would like to open it to a…

Lindsay MacVean
- 11
- 1
0
votes
0 answers
React PWA with react-app-rewired, custom service worker not working after updating to Workbox 7
I recently updated these packages from version 5 to 7 :
workbox-core
workbox-precaching
workbox-webpack-plugin
My app uses react-app-rewired to override the config, here's what my config-overrides.js looks like :
const WorkboxWebpackPlugin =…

Bastien Fontaine
- 11
- 3
0
votes
1 answer
Cypress not running with react-app-rewired
I am trying to run cypress tests with reac-app-rewired but somehow I cannot get it working.
It appears as if cypress is not able to detect the config-overrides.js file in my project and I keep getting the following error when I run the command npm…

mnagdev
- 384
- 3
- 11
0
votes
0 answers
React Polyfills: react-app-rewired making crypto/crypto-browserify get imported outside of src
I am getting this error:
Module not found: Error: You attempted to import
/my-project/node_modules/crypto-browserify/index.js which falls
outside of the project src/ directory. Relative imports outside of
src/ are not supported.
I need to use the…

RenSM
- 11
- 3
0
votes
1 answer
How to hide source code while i run react-app-rewired build and react-app-rewired start
my browser is look like (https://i.stack.imgur.com/5qCnT.png)
cross-env set GENERATE_SOURCEMAP=false&&react-app-rewired build
can not hide my source code in browser
anything can solve this problem

albert
- 3
- 2
0
votes
0 answers
Running react-app-rewired build fails with webpack 5
I'm having issues building my client with react-app-rewired 2.2.0 and webpack 5.77.0.
Creating an optimized production build...
Failed to compile.
Cannot read properties of undefined (reading 'includes')
Has anyone run into this? I was trying to…

icebox
- 19
- 3
0
votes
0 answers
React tests outside delivery project
I have a problem and I cannot find any solution that works.
I want to be able to have all my react unit-tests outside my delivery project, so whenever we create a delivery it only contains the source code and not the tests.
All the code are written…

CheckeredPaper
- 39
- 3
0
votes
0 answers
React shared component using rewired - "Support for the experimental syntax 'jsx' isn't currently enabled"
I have two create-react-apps in a repo: shared and my-app.
There is a shared/src/Test.js component:
export default function Test(){
return
This is the shared component!!!
}
In my-app I have installed the following:
npm install…
RobKohr
- 6,611
- 7
- 48
- 69
0
votes
2 answers
Blank page when deploying React app to Heroku with react-app-rewired
My website (react app) returns a blank page after deploying on Heroku. Although, it runs well on localhost. Hence, it most likely has to do with how Heroku run build and/or start.
The error arose after I had to change the scripts in package.json to…

Clement
- 31
- 5
0
votes
1 answer
How to solve Content not from webpack is served from
I add react-app-rewired and customize-cra to my project.
when I use "npm start" run my project,and I get an error like Content not from webpack is served from
enter image description here
here's my package.json file
{
"name": "geek-app",
…