【发布时间】:2022-01-14 05:43:37
【问题描述】:
我已将项目编译到 dist 文件夹中,并希望从 html 文件启动该站点。使用服务器语言环境时,一切正常,但是当您运行 html 时,会发出错误并且页面无法加载。有什么问题?
Uncaught DOMException: Failed to execute 'replaceState' on 'History':
A history state object with URL 'file:///C:/404' cannot be created in a document with origin 'null' and URL
【问题讨论】:
-
stackoverflow.com/questions/63115145/… 能解决您的问题吗?
标签: javascript reactjs webpack react-router