Node.js 生成后REACTJS中的空白页
我还在学习,所以请放松 我已经完成了部署和构建应用程序。但只有最初的页面显示内容。。。 又是一页,一片空白。在控制台中,他似乎找到了页面,但没有打开 此错误在控制台中出现:Node.js 生成后REACTJS中的空白页,node.js,reactjs,express,.htaccess,build,Node.js,Reactjs,Express,.htaccess,Build,我还在学习,所以请放松 我已经完成了部署和构建应用程序。但只有最初的页面显示内容。。。 又是一页,一片空白。在控制台中,他似乎找到了页面,但没有打开 此错误在控制台中出现: Uncaught SyntaxError: Unexpected token '<' 2.283742ca.chunk.js:1 Uncaught SyntaxError: Unexpected token '<' main.9ee80443.chunk.js:1 <IfModule mod_re
Uncaught SyntaxError: Unexpected token '<' 2.283742ca.chunk.js:1
Uncaught SyntaxError: Unexpected token '<' main.9ee80443.chunk.js:1
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
app.use(express.static(path.join(__dirname, "client/build")));
app.get("*", (req, res) => {
res.sendFile(path.join(__dirname, "client/build", "index.html"));
});