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

svelte5: config; unknown option config.kit.output #12508

Open
laciferin2024 opened this issue Jul 19, 2024 · 0 comments
Open

svelte5: config; unknown option config.kit.output #12508

laciferin2024 opened this issue Jul 19, 2024 · 0 comments

Comments

@laciferin2024
Copy link

Describe the bug

After updating svelte to "^5.0.0-next.192" , bug surfaces

Reproduction

-- svelte.config.js--

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://kit.svelte.dev/docs/integrations#preprocessors
	// for more information about preprocessors
	preprocess: [vitePreprocess({})],

	kit: {
		csrf: {
			checkOrigin: false, //FIXME: CVE
		},
		// embedded: true,
		env: {
			dir: ".",
			publicPrefix: "PUBLIC_",
			privatePrefix: "",
		},
		files: {
			assets: "static",
		},
		// inlineStyleThreshold: 5*1024, //default 0,

		csp: {
			mode: "auto",
			directives: {
				// hack for everything
				"default-src": ["self", "unsafe-inline", "data:"],
				"connect-src": ["self", "data:", "https:", "filesystem:", "http:", "wss:"],
				"style-src": ["self", "unsafe-inline"],
				"font-src": ["self", "unsafe-inline", "data:"],
				"script-src": ["self", "wasm-unsafe-eval", "unsafe-inline", "unsafe-hashes"],
				"script-src-elem": [
					// "https://zauth.netlify.app",
					"self",
					"unsafe-inline",
					"wasm-unsafe-eval",
				],
			},
			// reportOnly: {
			// 	"script-src": ["self"],
			// },
		},
		// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
		// If your environment is not supported or you settled on a specific environment, switch out the adapter.
		// See https://kit.svelte.dev/docs/adapters for more information about adapters.
		adapter: netlify({
			edge: false,
			split: false, //both don't work together
		}),

		// adapter: staticAdapter({
		// 	// default options are shown. On some platforms
		// 	// these options are set automatically — see below
		// 	pages: 'build',
		// 	assets: 'build',
		// 	fallback: '/index.html',
		// 	precompress: false,
		// 	strict: false,
		// }),
		// prerender: {
		// 	crawl: true,
		// 	concurrency: 1,
		// 	handleHttpError: ({ path, referrer, message }) => {
		// 					// ignore deliberate link to shiny 404 page
		// 					if (path === '/not-found' && referrer === '/blog/how-we-built-our-404-page') {
		// 						return;
		// 					}

		// 					// otherwise fail the build
		// 					throw new Error(message);
		// 				}

		// 	// use relative URLs similar to an anchor tag <a href="/test/1"></a>
		// 	// do not include group layout folders in the path such as /(group)/test/1
		// 	// entries: ['/proof/view/ad074eb8-2bc0-4432-9636-04cceb7c1e87', '/qr/c94476a0-8a75-4563-b70a-bf6124d7c59b']
		// 	// entries: ['*','/']
		// },
		appDir: "app",
		version: {
			// name: child_process.execSync("git rev-parse HEAD").toString().trim(),
			name: tag,
		},
		output: {
			preloadStrategy: "modulepreload",
		},
	},
};

export default config;

Svetlekit :

"@sveltejs/kit": "^1.0.0-next.589",
"svelte": "^5.0.0-next.192",

Logs

$ bun run build
$ bun check && rimraf build 
$ svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
{ tag: 'v0.16.2-8-g9f8fd75' }
> Unexpected option config.kit.output
    at file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/core/config/options.js:264:12
    at file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/core/config/options.js:271:18
    at validate_config (file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/core/config/index.js:99:9)
    at process_config (file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/core/config/index.js:71:20)
    at load_config (file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/core/config/index.js:63:9)
    at async file:///Volumes/N/Reclaim/zauth/node_modules/@sveltejs/kit/src/cli.js:36:19
error: script "check" exited with code 1
error: script "prebuild" exited with code 1
error: script "b" exited with code 1

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1
    Memory: 161.83 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 9.8.1 - /opt/homebrew/bin/npm
    pnpm: 9.1.0 - /opt/homebrew/bin/pnpm
    bun: 1.1.13 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 126.0.6478.183
    Safari: 17.5
  npmPackages:
    svelte: ^5.0.0-next.192 => 5.0.0-next.192

Severity

blocking an upgrade

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

1 participant