create-react-app is a starter-kit for creating React applications with no build configuration. If you’re getting started with React, use this to automate the build of your application. There isn't any configuration file, and react-scripts is the only extra build dependency in your package.json file. Your environment will have everything you need to build a modern React application.
Questions tagged [create-react-app]
5893 questions
3
votes
3 answers
Is is possible to disable source-maps in create-react-app without having to eject
Was wondering was it possible to disable source-maps in create-react-app without having to eject. Guessing once you eject from create-react-app you can disable source-maps in webpack.

uidevthing
- 1,781
- 2
- 12
- 24
3
votes
3 answers
React static website redirect every page to 404 besides homepage
I published my first react app to my shared hosting.
It was multi-page react application, After I built my project successfully, I did Yarn Build which made a build folder
I uploaded that built folder to my hosting but for some reason my hosting…

Alwaysblue
- 9,948
- 38
- 121
- 210
3
votes
2 answers
React - use relative paths to static assets in CSS
I'm using create-react-app to build an interface for an Electron app. As such, the built React app essentially runs locally rather than from a server.
Naturally I have a load of SCSS being built by React, but as part of the build process my paths…

Alex
- 1,051
- 1
- 12
- 26
3
votes
2 answers
Use absolute paths with Jest
I have create an app with create-react-app.
I have set in .env my NODE_PATH=src/
All works fine when I launch react-script start but when I launch react-script test I have an error: import is not found.
In my package.json :
"test": "jest --colors…

D2DN
- 59
- 9
3
votes
1 answer
Proxying API request from React frontend to Flask backend on two separate Heroku apps
I am working on a web application with a create-react-app frontend and a Flask API backend with Flask-RESTful. I built the app locally and it works on my computer, but now I am unsuccessfully trying to deploy it to Heroku.
I deployed the Flask…

pomtree
- 148
- 2
- 10
3
votes
0 answers
Finite variable width slider (that scrolls only visible slides), slides should always fill the display area
I hope this is not a "big ask" but I'm stuck. I asked this issue on github issues#1334 but I have not got any responsive from the maintainers of the project. Hopefully I can get help here.
Overview
My issue is that I'm trying to adjust the…

dryleaf
- 415
- 3
- 18
3
votes
1 answer
react-create-app prod html from public folder not found for an iframe
I have a create-react-app that needs to embed an html file (along with its own JS and other files) into an iframe on one of the components. I've searched the Facebook react docs on public folder (which says it should work), various other stack…

donnierisk
- 31
- 4
3
votes
3 answers
Import image from json source (create-react-app)
I have some json with data and one of param is path to my local folder with images:
// data.json
[
{
"id": 1,
"image": "assets/somepic.png"
},
{
"id": 2,
"image": "assets/anotherpic.png"
}
// similar data goes…

WebArtisan
- 3,996
- 10
- 42
- 62
3
votes
1 answer
Securing .env parameters in react project
I'm new to React and js worlds, I'm trying to create production build of my application
This application has some env parameters (api keys, secrets, etc.) living in .env.production file, when I run yarn build I get /build folder, especially main.js…

Generwp
- 514
- 4
- 16
3
votes
2 answers
Edit Files After Build, React
I built an app in React with create-react-app. Just JavaScript, CSS, HTML & React. I ran npm build then deployed the app to Netlify.
I want to go back and edit some CSS. So, I cd into the directory from my laptop and deploy on localhost:5000. I…

wallwalker
- 591
- 7
- 14
- 27
3
votes
1 answer
deploying create-react-app to gh-pages
This is well documented and I have followed the instructions very carefully several times over.
HOWEVER, every time I run the 'npm run deploy' command on a completely vanilla create-react-app install, it fails on my system with this…

Matt
- 124
- 12
3
votes
1 answer
Should I use registerServiceWorker in React production?
When you bootstrap your React app with create-react-app there is a file named registerServiceWorker.js which is imported and used in index.js as:
import React from 'react'
import ReactDOM from 'react-dom'
import App from 'App'
import…

Ahmad Maleki
- 1,415
- 3
- 21
- 35
3
votes
1 answer
Splash screen in Create-React-App
I'm using create-react-app to design a PWA. The default Splash screen provided by the App is an icon (in middle of the screen) and a name of the app below that icon. Icon & name must be provided in the manifest file.
Question: Is there any way to…

Radix
- 2,527
- 1
- 19
- 43
3
votes
2 answers
Failed to minify code on npm run build
I have finished my react application that was created with
create-react-app
, i have no issues running on local with npm start but when i try to build using
npm-build
i get an error on minifying the code. I have tried cloning my project and…

Jonathan Stro
- 99
- 2
- 6
3
votes
1 answer
Create an electron create-react-app distribution with static files
What I want
I want to create a desktop app that reads in a json data file, then uses that data to render things on screen. The json data file needs to be packaged into the app
What I did
Follow an article how to use create-react-app and make it…

kenny
- 1,157
- 1
- 16
- 41