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 (SPA mode): index.html not generated when prerender.enabled = false #1705

Closed
UltraCakeBakery opened this issue Jun 17, 2021 · 2 comments

Comments

@UltraCakeBakery
Copy link

UltraCakeBakery commented Jun 17, 2021

Describe the bug
The following config causes adapter-static -> npm run build to not include the root index.html file - the one that you always send to the client - as specified in the adapter settings object, which is required to actually load the SPA.

import adapter from '@sveltejs/adapter-static';

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter({
			fallback: 'index.html'
		}),
		ssr: false,
		prerender: {
			enabled: false
		}
	}
};

export default config;

Logs
N/A

To Reproduce

  1. npm init svelte@next
  2. select the skeleton project, say no to everything typescript etc.
  3. copy paste my config and install the static adapter

Expected behavior
I don't the file to not be included when disabling prerendering. It would make even more sense for it to be required to be set to false for the files to be generated.

Stacktraces
N\A

Severity
On a scale from 1 to 10, maybe a 3.3? I have no idea as this might be intended behavior that I am not aware off.

@UltraCakeBakery
Copy link
Author

Another way to describe this issue:

The fallback option file is not generated when prerender.enabled is false

@Conduitry
Copy link
Member

Sounds like a duplicate of #1588.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants