私はいくつかの反応するhtmlを生成しようとしていますが、奇妙なスペースがhtmlを破るように挿入されています。pg-generator nunjucks不必要なスペースが挿入され、htmlが破損しています
助けてください!!!!コマンドを実行しているベーステンプレート
を使用して
pgen exec pg-generator-templates/react-crud-template/ -d convectorFeathersServer -u postgres -p postgres -t src/react-crud-build
私のテンプレートファイル:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css">
<title>React App</title>
</head>
<body>
<div id="root"></div>
<script src="bundle.js"></script>
</body>
結果
< !doctype html >
<
html lang = "en" >
<
head >
<
meta charset = "utf-8" >
<
meta name = "viewport"
content = "width=device-width, initial-scale=1" >
<
link rel = "stylesheet"
href = "https://maxcdn.bootstrapcdn.com/bootstrap/latest/css/bootstrap.min.css" >
<
title > React App < /title> <
/head> <
body >
<
div id = "root" > < /div>
<
script src = "bundle.js" > < /script> <
/body> <
/html>
オザム氏は喜んで答えてここに答えました! https://github.com/ozum/pg-generator/issues/30 – fedevela
htmlとjsの拡張機能に結びついている美人がいるようです...私は.jsxで試しませんでした.....: - ? – fedevela