B
B
Black_Fire2020-12-05 18:38:51
React
Black_Fire, 2020-12-05 18:38:51

Why empty index.html in build folder?

I started the build with the npm run build command, the build folder appeared, but the index.html in it is empty. Everything runs on localhost.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Black_Fire, 2020-12-05
@Black_Fire

Because you need to add a directive to package.json "homepage": "."because webpack tries to load static files from the root of the file system, not from the build directory.
And this is not at all an obvious thing, and not "what is the question, such is the answer."

B
bqio, 2020-12-05
@bqio

Probably because you did something wrong. What a question, such an answer.

L
Leonid Yakovlev, 2020-12-05
@deleo547

I agree, probably because.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question