Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter-static completely silent #3224

Closed
iacore opened this issue Jan 6, 2022 · 1 comment
Closed

adapter-static completely silent #3224

iacore opened this issue Jan 6, 2022 · 1 comment
Labels
feature request New feature or request p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. pkg:adapter-static

Comments

@iacore
Copy link

iacore commented Jan 6, 2022

Describe the bug

The build output when using adapter-static is confusing for people who first use Svelte Kit. It shows a server being built by vite, without mentioning the output directory of static files. (see Logs below)

I think it should show only the output files since they are the most important.

Reproduction

  1. npm init svelte@next and choose skeleton project
  2. Replace svelte.config.js with below and install @sveltejs/adapter-static@next
import adapter from '@sveltejs/adapter-static';
import preprocess from 'svelte-preprocess';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: preprocess(),

	kit: {
		adapter: adapter(),
	}
};

export default config;
  1. run yarn build

Logs

The most useful output directory is build/, but it can't be seen anywhere in the project, since it's a default value of adapter-static.

> yarn build
yarn run v1.22.17
$ svelte-kit build
vite v2.7.10 building for production...
✓ 26 modules transformed.
.svelte-kit/output/client/_app/manifest.json                               1.30 KiB
.svelte-kit/output/client/_app/start-ce44103b.js                           19.66 KiB / gzip: 6.81 KiB
.svelte-kit/output/client/_app/pages/__layout.svelte-0a5295ac.js           0.53 KiB / gzip: 0.36 KiB
.svelte-kit/output/client/_app/error.svelte-25c9b117.js                    1.56 KiB / gzip: 0.75 KiB
.svelte-kit/output/client/_app/pages/index.svelte-7a7cfe53.js              6.38 KiB / gzip: 2.39 KiB
.svelte-kit/output/client/_app/chunks/vendor-1b27f159.js                   11.49 KiB / gzip: 4.98 KiB
.svelte-kit/output/client/_app/assets/start-61d1577b.css                   0.16 KiB / gzip: 0.15 KiB
.svelte-kit/output/client/_app/assets/pages/index.svelte-77e904d2.css      0.14 KiB / gzip: 0.12 KiB
.svelte-kit/output/client/_app/assets/pages/__layout.svelte-7e11ce37.css   0.72 KiB / gzip: 0.43 KiB
vite v2.7.10 building SSR bundle for production...
✓ 19 modules transformed.
.svelte-kit/output/server/manifest.json                      1.04 KiB
.svelte-kit/output/server/app.js                             46.60 KiB
.svelte-kit/output/server/entries/pages/__layout.svelte.js   0.26 KiB
.svelte-kit/output/server/entries/pages/error.svelte.js      0.72 KiB
.svelte-kit/output/server/entries/pages/index.svelte.js      5.96 KiB
.svelte-kit/output/server/chunks/index-207788bc.js           2.57 KiB

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-static
  ✔ done
Done in 2.39s.

System Info

  Binaries:
    Node: 17.3.0 - /usr/bin/node
    Yarn: 1.22.17 - /usr/bin/yarn
    npm: 8.3.0 - /usr/bin/npm
  npmPackages:
    @sveltejs/adapter-static: ^1.0.0-next.24 => 1.0.0-next.24 
    @sveltejs/kit: ^1.0.0-next.216 => 1.0.0-next.216 
    svelte: ^3.44.0 => 3.44.3

Severity

Confusing for new users

Additional Information

No response

@bluwy bluwy added feature request New feature or request help wanted p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. pkg:adapter-static labels Jan 7, 2022
@geoffrich
Copy link
Member

Was this closed by #3274?

@bluwy bluwy closed this as completed Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request p2-nice-to-have SvelteKit cannot be used by a small number of people, quality of life improvements, etc. pkg:adapter-static
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants