以前,在运行yarn build
后打开index.html显示空白页。
我通过在我的package.json中添加"homepage": "./"
来使其显示某些内容。
现在它确实显示了某些内容,但是缺少了很多组件。主要是它不会渲染src / data / images中的任何图像。
除此之外,浏览器还会显示以下错误:
Access to internal resource at 'file:///Users/josephliu/workspace/speedlimit_signs/build/manifest.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, brave, chrome-untrusted, https.
这是我的项目文件夹的样子:
project/
build/
public/
src/
components/
data/
train_images/
test_images/