Skip to content

Unclear documentation with output.bundleStrategy === 'inline' and router.type === 'hash' #13233

Closed
@stephenlrandall

Description

@stephenlrandall

Describe the bug

Perhaps I'm missing something obvious here, but attempting to use bundleStrategy: inline with adapter-static in a fresh SvelteKit skeleton project produces the following errors:

errors

My configuration is

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

/** @type {import('@sveltejs/kit').Config} */
const config = {
	kit: {
		adapter: adapter({
			pages: 'build',
			assets: 'build',
			fallback: 'index.html'
		}),
		output: {
			bundleStrategy: 'inline'
		}
	}
};

export default config;

Reproduction

Use npx sv create ... and modify the Svelte config file to the above after adding @sveltejs/adapter-static as a dependency.

Logs

[Error] Error: Not found: /Users/.../Desktop/single-page-test/build/index.html
	handleError (index.html:21:4246)
	Me (index.html:19:45323)
	(anonymous function) (index.html:19:42665)
	st (index.html:19:44185)
	ra (index.html:19:34874)
	(anonymous function) (index.html:19:34277)
[Error] Cross origin requests are only supported for HTTP.
	(anonymous function) (index.html:19:28564)
	r (index.html:19:28764)
	(anonymous function) (index.html:19:43111)
[Error] Fetch API cannot load file:///_app/version.json due to access control checks.
	(anonymous function) (index.html:19:28564)
	r (index.html:19:28764)
	(anonymous function) (index.html:19:43111)
[Error] Not allowed to load local resource: file:///favicon.ico

System Info

System:
    OS: macOS 15.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 144.17 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.8.0 - /usr/local/bin/node
    npm: 10.1.0 - /usr/local/bin/npm
    pnpm: 9.15.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 131.0.6778.205
    Edge: 131.0.2903.112
    Safari: 18.2
  npmPackages:
    @sveltejs/adapter-auto: ^3.0.0 => 3.3.1 
    @sveltejs/adapter-static: ^3.0.0 => 3.0.8 
    @sveltejs/kit: ^2.0.0 => 2.15.0 
    @sveltejs/vite-plugin-svelte: ^4.0.0 => 4.0.4 
    svelte: ^5.0.0 => 5.15.0 
    vite: ^5.4.11 => 5.4.11

Severity

annoyance

Additional Information

Really happy to see this feature getting attention -- it's incredibly useful in certain environments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions