Closed MetaiR closed 2 years ago
the weird thing is it actually doesn't care if the body is empty or not the only thing it cares about is existing this line in the body:
<span>🚫</span>
it is super weird!!!!!! the workaround is to have it like this:
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<span hidden>🚫</span>
</body>
</html>
Bytenode should not be affecting the HTML files at all. It only runs on .js files (and .ts files which have been compiled to .js). However, Webpack may be trying to insert a <script>
link into your HTML files. This could be a problem with improperly formatted or missing HTML files.
Try putting meta charset in HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Hello World!</title>
</head>
<body>
</body>
</html>
I've updated the project with the meta tag. Hopefully, this will help other people who are having this problem.
Hi, it looks like the bytenode cant run an empty index.html this is important since react and other frameworks will render and attach content after the js loads and during this process the HTML file is empty
here is the error:
remember it is only happening on production and running the program executable generated by npm run package and it is ok on the dev mode