简体   繁体   中英

Does build/index.html serve as a standalone webpage without server?

Does build/index.html generated after npm run build serve as a standalone webpage or does it only work with serve -s build.

index.html file returns blank page and on inspecting the page it shows: "main.17cbfec0.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND"

在此处输入图像描述

You should serve the entire build directory, not just specific files as the index.html file relies on various JavaScript bundles generated by CRA, which are all located in that build folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM