Describe the bug
When doing sapper export after sapper build the exported HTML has tags with urls or routes such as <script href=http://example.com /> which does not have quotes around the url, that's seems not to be a problem for the browser but it's a pain to work with when using sapper merely as a prototyping tool in order to then port the components to a different technology.
Logs
> TODO@0.0.1 export
> sapper export
> Building...
┌─────────────────────────────┐
│ built client with 1 warning │
└─────────────────────────────┘
Hash: 57647d69834c2903493b
Version: webpack 4.46.0
Time: 431ms
Built at: 03/13/2021 11:55:23 AM
Asset Size Chunks Chunk Names
1a7995d9ba835edd2e10b82db7371a3f.jpg 76.8 KiB [emitted] [immutable]
57647d69834c2903493b/about.0.js 1010 bytes 0 [emitted] [immutable] about
57647d69834c2903493b/blog.1.js 2.24 KiB 1 [emitted] [immutable] blog
57647d69834c2903493b/blog_$slug.2.js 1.82 KiB 2 [emitted] [immutable] blog_$slug
57647d69834c2903493b/index.3.js 2.51 KiB 3 [emitted] [immutable] index
57647d69834c2903493b/main.js 26.2 KiB 4 [emitted] [immutable] main
Entrypoint main = 57647d69834c2903493b/main.js
[0] ./node_modules/svelte/internal/index.mjs 53.9 KiB {4} [built]
[1] ./src/client.js + 9 modules 43.5 KiB {4} [built]
| ./src/client.js 101 bytes [built]
| ./src/node_modules/@sapper/app.mjs 18.6 KiB [built]
| ./node_modules/svelte/index.mjs 212 bytes [built]
| ./node_modules/svelte/store/index.mjs 3.24 KiB [built]
| ./src/node_modules/@sapper/internal/shared.mjs 108 bytes [built]
| ./src/node_modules/@sapper/internal/App.svelte 7.97 KiB [built]
| ./src/node_modules/@sapper/internal/manifest-client.mjs 1.18 KiB [built]
| ./src/routes/_layout.svelte 2.96 KiB [built]
| ./src/routes/_error.svelte 4.28 KiB [built]
| ./src/components/Nav.svelte 4.92 KiB [built]
[2] ./src/routes/about.svelte 1.64 KiB {0} [built]
[3] ./src/routes/blog/index.svelte 4.34 KiB {1} [built]
[4] ./src/routes/blog/[slug].svelte 3.17 KiB {2} [built]
[5] ./src/routes/index.svelte + 1 modules 3.87 KiB {3} [built]
| ./src/routes/index.svelte 3.79 KiB [built]
| ./src/node_modules/images/successkid.jpg 80 bytes [built]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
┌─────────────────────────────┐
│ built server with 1 warning │
└─────────────────────────────┘
Hash: d03d838e72a16ab6b98c
Version: webpack 4.46.0
Time: 214ms
Built at: 03/13/2021 11:55:24 AM
Asset Size Chunks Chunk Names
1a7995d9ba835edd2e10b82db7371a3f.jpg 76.8 KiB [emitted] [immutable]
server.js 84 KiB 0 [emitted] server
Entrypoint server = server.js
[0] external "path" 42 bytes {0} [built]
[1] external "stream" 42 bytes {0} [built]
[2] external "fs" 42 bytes {0} [built]
[3] external "zlib" 42 bytes {0} [built]
[4] external "url" 42 bytes {0} [built]
[5] external "http" 42 bytes {0} [built]
[6] external "sirv" 42 bytes {0} [built]
[7] external "polka" 42 bytes {0} [built]
[8] external "compression" 42 bytes {0} [built]
[9] external "https" 42 bytes {0} [built]
[10] external "encoding" 42 bytes {0} [optional] [built]
[11] ./src/server.js + 18 modules 242 KiB {0} [built]
| ./src/server.js 410 bytes [built]
| ./src/node_modules/@sapper/server.mjs 159 KiB [built]
| ./src/node_modules/@sapper/internal/manifest-server.mjs 1.63 KiB [built]
| ./node_modules/svelte/store/index.mjs 3.24 KiB [built]
| ./src/node_modules/@sapper/internal/App.svelte 1.8 KiB [built]
| ./src/routes/blog/index.json.js 263 bytes [built]
| ./src/routes/blog/[slug].json.js 552 bytes [built]
| ./node_modules/svelte/internal/index.mjs 53.9 KiB [built]
| ./src/routes/index.svelte 2.82 KiB [built]
| ./src/routes/about.svelte 403 bytes [built]
| ./src/routes/blog/index.svelte 1.9 KiB [built]
| ./src/routes/blog/[slug].svelte 3.56 KiB [built]
| ./src/routes/_layout.svelte 1.41 KiB [built]
| ./src/routes/_error.svelte 2.14 KiB [built]
| ./node_modules/svelte/index.mjs 212 bytes [built]
| + 4 hidden modules
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
┌────────────────────────────────────┐
│ built serviceworker with 1 warning │
└────────────────────────────────────┘
Hash: 51baeac611d38969121d
Version: webpack 4.46.0
Time: 121ms
Built at: 03/13/2021 11:55:24 AM
Asset Size Chunks Chunk Names
service-worker.js 2.19 KiB 0 [emitted] service-worker
Entrypoint service-worker = service-worker.js
[0] ./src/service-worker.js + 1 modules 3.26 KiB {0} [built]
| ./src/service-worker.js 2.56 KiB [built]
| ./src/node_modules/@sapper/service-worker.js 721 bytes [built]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
> Built in 1.2s
> Crawling http://localhost:3000/
1.66 kB service-worker-index.html
2.53 kB index.html
78.7 kB client/1a7995d9ba835edd2e10b82db7371a3f.jpg
3.13 kB favicon.png
319 B blog.json
2.57 kB client/57647d69834c2903493b/index.3.js
1.88 kB about/index.html
26.8 kB client/57647d69834c2903493b/main.js
584 B global.css
324 B manifest.json
2.62 kB blog/index.html
1.01 kB client/57647d69834c2903493b/about.0.js
2.29 kB client/57647d69834c2903493b/blog.1.js
1.34 kB blog/what-is-sapper.json
611 B blog/how-to-use-sapper.json
603 B blog/why-the-name.json
1.43 kB blog/how-is-sapper-different-from-next.json
371 B blog/how-can-i-get-involved.json
3.77 kB blog/how-to-use-sapper/index.html
3.54 kB blog/why-the-name/index.html
3.08 kB blog/how-can-i-get-involved/index.html
5.15 kB blog/what-is-sapper/index.html
5.56 kB blog/how-is-sapper-different-from-next/index.html
1.86 kB client/57647d69834c2903493b/blog_$slug.2.js
> Finished in 1.4s. Type npx serve __sapper__/export to run the app.
To Reproduce
npx degit "sveltejs/sapper-template#webpack" sapper_wp
npm install
npm run export
To help us help you, if you've found a bug please consider the following:
If possible, we recommend creating a small repo that illustrates the problem.
Reproductions should be small, self-contained, correct examples – http://sscce.org.
Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.
Expected behavior
all Githubissues.
Githubissues is a development platform for aggregating issues.
Describe the bug When doing
sapper export
aftersapper build
the exported HTML has tags with urls or routes such as<script href=http://example.com />
which does not have quotes around the url, that's seems not to be a problem for the browser but it's a pain to work with when using sapper merely as a prototyping tool in order to then port the components to a different technology.Logs
To Reproduce
To help us help you, if you've found a bug please consider the following:
Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.
Expected behavior all Githubissues.