Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

after build react return blank page

Specify 'homepage' on package.json as
"homepage": "."
Do the build again

In case it doesn't work,
if you're using react-router and trying to open index.html directly in 
the browser (or using electron, which essentially does that), in addition 
to setting homepage as others have suggested, replace your BrowserRouter 
with a HashRouter
Comment

PREVIOUS NEXT
Code Example
Javascript :: for in loop js 
Javascript :: read json file into array javascript 
Javascript :: jquery selector class child 
Javascript :: jquery datatable rest api 
Javascript :: Alpinejs notification 
Javascript :: js detect if content editable div is empty 
Javascript :: javascript static variable in class 
Javascript :: Adding a Method to a JavaScript Object 
Javascript :: validate email or phone js 
Javascript :: javascript select function 
Javascript :: express json body 
Javascript :: reload parent window from prompt 
Javascript :: application pool angular 8 
Javascript :: active-class router-link 
Javascript :: move last element of array to begining javascript 
Javascript :: ${} js 
Javascript :: java hashmap get array of keys 
Javascript :: jquery dynamic event handling 
Javascript :: ternary operator jquery 
Javascript :: js object entries 
Javascript :: tableau js 
Javascript :: Sequelize.Op; 
Javascript :: fizz buzz program in javascript 
Javascript :: js how to calculate factorial 
Javascript :: fetch data with axios in reactjs 
Javascript :: buffer to image nodejs 
Javascript :: scroll for sticky 
Javascript :: json arrays 
Javascript :: react router dom v6 private route 
Javascript :: react convert excel to json 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =