Questions tagged [react-app-rewired]

a tool that allows for easy overriding of create-react-app webpack configs without having to eject

88 questions
2
votes
1 answer

typescript error using google.maps - 'google' is not defined

I have the following in package.json "@types/google.maps": "~3.48.3", // in my tsx file the first line at the top is /// But on accessing google.maps.MapMouseEvent - I get the error 'google' is not defined. Line…
nishant
  • 736
  • 1
  • 12
  • 22
2
votes
1 answer

Adding csp-html-webpack-plugin dosnt load my react webpage

I am using the npm react-app-rewired customize-cra csp-html-webpack-plugin to give my application more security following this example https://medium.com/@nrshahri/csp-cra-324dd83fe5ff My config-overrides.js looks like this const { override } =…
2
votes
1 answer

React app rewired doesnt run under port 1024

I have this React application that needs to run under port 443. Usually it works fine but now i got a new computer and for some odd reason i cant run it anymore. I have two ways for this. A custom script in the package.json file and it should also…
2
votes
0 answers

How to import a namespaced css from node_modules in the entries of a rewired create-react-app? Is react-app-rewire-multiple-entry the way to go?

I have a create-react-app not ejected and rewired with react-app-rewired and customized with customize-cra. This is the scenario and I currently can't change it. Here it is the configuration of config-overrides.js: const path = require('path') const…
axel
  • 3,778
  • 4
  • 45
  • 72
2
votes
2 answers

Update webpack 4 to webpack 5 on an existing create-react-app ejected with react-app-rewired

I have an existing old react application, created with create-react-app and ejected with react-app-rewired. I'm updating the deprecated dependencies. I've already updated react-scripts to the current version (4.0.3) and everything works fine. But I…
2
votes
0 answers

how to set babel plugins and presets - react-app-rewired

i am new to babel and testing stuff in react so it would be really great if you can provide a little more context for the approaches you can suggest. Thank you The app was created using react-app-rewired everything works fine but when i run my test…
2
votes
1 answer

React CRA with SSR configuration throws 404 when using the resulting html

I have a react application built using CRA with the default configurations. I wanted to make SSR, so I followed an article something similar to this https://www.vairix.com/tech-blog/server-side-rendering-ssr-of-create-react-app-cra-app-in-2020 Next,…
2
votes
1 answer

Ability to convert a json file to js in Jest

We are using create-react-app to build our declarative framework. In this framework, we author a json file which gets loaded into a react-component by webpack. We have authored specific loader for that. This works well in the browser. But facing…
1
vote
0 answers

How to prevent case-sensitivity issue with react-app-rewired?

I have an issue with making builds using react-app-rewired which I'm not really sure how to resolve. Currently I make builds in my project using react-app-rewired build, with no custom Webpack overrides. This leads to one of three scenarios: On my…
Will Bagley
  • 165
  • 3
  • 13
1
vote
0 answers

HtmlWebpackPlugin hook not called in CRA

I'm using react-scripts 4.0.3 and react-app-rewired 2.1.6 to make some adjustments to the webpack config. I want to alter some attributes of the script tags that are generated and injected into index.html. I'm using alterAssetTags hook of the…
1
vote
1 answer

How do I fix this css prop horror show using emotion/twin.macro?

I am struggling to get my twin.macro setup working in my React app. I cannot provide an entire history of what I've tried, since I have tried dozens of different things, but I will outline my current setup and outline what is not working. I am using…
serlingpa
  • 12,024
  • 24
  • 80
  • 130
1
vote
0 answers

websocket connection fails for chrome extension

I am upgrading the manifest to v3. When I load the extension I get the following error WebSocket connection to 'ws://pboiicdpnbleoponcncnednhgapmcbfb/sockjs-node' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED in local…
1
vote
1 answer

react-app-rewired not working with tailwind css

I have an ongoing React.js project with these react versions. "react": "^17.0.2", "react-scripts": "^4.0.3", The project is running perfectly without any issues. I wanted to add tailwind CSS for some parts of my project. So I follow all the steps…
1
vote
1 answer

react-app-rewired add writeDisk option on devserver

I am using react-app-rewired to override my webpack configurations. But I tried to set writeDisk option but it doesn't work. Here is config-overrides.js file const { override, disableChunk, addWebpackResolve, addWebpackAlias } =…
1
vote
0 answers

react js override webpack config for javascript & css bundle with craco

i have a react application for which i want to modify the javascript and css bundles which are building by the webpack every time the App is build to avoid the browser caching issue for example right now it is like that chunkFilename:…
jsBuddy
  • 49
  • 7