Closed ruslandoga closed 3 years ago
This is actual valid HTML and has been for a very long time. It is omitted from the build version as way to optimize the load, less to download, faster parse times, etc... It is very doubtful this is the cause of broken layout, even in older browser, considering how long this has been around. If you go back far enough for this to break you will run into a lot more severe issues regarding unsupported features of html, css or js beforehand.
Ah, thank you for the info @stephane-vanraes , I didn't know about it.
👋
Describe the bug
</body></html>
are cut out from the HTML response in prod version of the app.To Reproduce Please make sure you've tested with the latest versions of Svelte and Sapper.
Steps:
npx degit "sveltejs/sapper-template#webpack" test
(it affects rollup version as well)cd test && yarn
yarn dev --no-hot
curl localhost:3000
results inHTML response
Note that
</body></html>
are included at the end of the response.yarn build && node __sapper__/build
curl localhost:3000
HTML response
```htmlGreat success!
Try editing this file (src/routes/index.svelte) to test live reloading.
Note that
</body></html>
are not present in the response.Expected behavior
</body></html>
are present in the prod version response.Information about your Sapper Installation:
The output of `npx envinfo --system --npmPackages svelte,sapper,rollup,webpack --binaries --browsers`
``` System: OS: macOS 10.15.7 CPU: (4) x64 Intel(R) Core(TM) i5-4258U CPU @ 2.40GHz Memory: 45.48 MB / 8.00 GB Shell: 3.1.2 - /usr/local/bin/fish Binaries: Node: 15.4.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 7.0.15 - /usr/local/bin/npm Browsers: Chrome: 87.0.4280.88 Firefox Developer Edition: 84.0 Safari: 14.0 npmPackages: sapper: ^0.28.0 => 0.28.10 svelte: ^3.17.3 => 3.31.0 webpack: ^4.7.0 => 4.44.2 ```Your browser:
curl
, so it affects all browsersYour hosting environment (i.e. Local, GCP/AWS/Azure, Vercel/Begin, etc...): local
If it is an exported (
npm run export
) or dynamic application: dynamicSeverity Probably not severe, but I suspect it might be the reason for broken layout on older browsers (safari on ios 10.3.4).