当我克隆官方Sapper模板时,安装依赖项并导出它
~$ degit "sveltejs/sapper-template#webpack" sapper-template
~$ cd sapper-template/
~/sapper-template$ npm install
~/sapper-template$ npm run export然后检查生成的index.html,没有关闭的</body>和</html>标记。
...
<body>
...
<script src=/client/4def89e12e93fe68fd0d/main.js> </script>
// EOF为什么Sapper会生成形式上无效的HTML?
发布于 2020-05-17 10:11:48
此问题已在皂甙存储库中讨论过::https://github.com/sveltejs/sapper/issues/1061
在这个问题上,有一个关于标签排放的HTML标准的链接:https://html.spec.whatwg.org/dev/syntax.html#syntax-tag-omission
结论是,虽然看起来很奇怪,但它是一个完全有效的html
https://stackoverflow.com/questions/61843696
复制相似问题