出于某种原因,我按照Firebase指南的每个步骤进行了部署( 安装firebase-tools,firebase登录,firebase初始化和firebase部署) 该项目成功部署,但无法加载react组件。我看到的是html上的空白页,我试图进行一些更改,它们可以正常工作,但只能像一些h1 h2标签一样用作普通javascript。当我尝试加载div =“ root”时,它完全没有任何错误消息。
这是我的html文件。我做错什么了吗?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-
to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/footer-logo.png">
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/footer-
logo.png">
<link rel="stylesheet" type="text/css"
href="https://fonts.googleapis.com/css?
family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
<link href="https://use.fontawesome.com/releases/v5.0.10/css/all.css"
rel="stylesheet">
<title>My Awesome React</title>
<script defer src="/__/firebase/5.5.5/firebase-app.js"></script>
<script defer src="/__/firebase/5.5.5/firebase-auth.js"></script>
<script defer src="/__/firebase/5.5.5/firebase-database.js"></script>
<script defer src="/__/firebase/5.5.5/firebase-messaging.js"></script>
<script defer src="/__/firebase/5.5.5/firebase-storage.js"></script>
<script defer src="/__/firebase/init.js"></script>
</head>
<body>
<h1>test</h1>
<div id="root"></div>
</body>
</html>