Skip to content

feat(config): deprecate flat config and move to hosting options#876

Open
peterpeterparker wants to merge 14 commits intomainfrom
feat/hosting-config
Open

feat(config): deprecate flat config and move to hosting options#876
peterpeterparker wants to merge 14 commits intomainfrom
feat/hosting-config

Conversation

@peterpeterparker
Copy link
Copy Markdown
Contributor

@peterpeterparker peterpeterparker commented Apr 6, 2026

Motivation

Instead of having the configuration for hosting deployment at the root of the Satellite configuration, we can regroup those in a sub-element hosting. Feel like it's a bit cleaner.

Notes

Since hosting will be itself optional, source can become mandatory within HostingConfig.

Example

For example, instead of

export default defineConfig({
	satellite: {
		ids: {
			development: 'atbka-rp777-77775-aaaaq-cai',
			production: 'ck4tp-3iaaa-aaaal-ab7da-cai'
		},
		source: 'build',
		predeploy: ['npm run build'],
		precompress: [
			{
				pattern: '**/*.+(js|mjs|css)',
				algorithm: 'brotli',
				mode: 'replace'
			},
			{
				pattern: '**/*.html',
				algorithm: 'brotli',
				mode: 'both'
			}
		],
		assertions: {
			heapMemory: 800_000_000n
		},
		collections
	}
});

havin

export default defineConfig({
	satellite: {
		ids: {
			development: 'atbka-rp777-77775-aaaaq-cai',
			production: 'ck4tp-3iaaa-aaaal-ab7da-cai'
		},
		hosting: {
			source: 'build',
			predeploy: ['npm run build'],
			precompress: [
				{
					pattern: '**/*.+(js|mjs|css)',
					algorithm: 'brotli',
					mode: 'replace'
				},
				{
					pattern: '**/*.html',
					algorithm: 'brotli',
					mode: 'both'
				}
			]
		},
		assertions: {
			heapMemory: 800_000_000n
		},
		collections
	}
});

@peterpeterparker peterpeterparker marked this pull request as draft April 6, 2026 19:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

size-limit report 📦

Path Size
@junobuild/admin 6.24 KB (0%)
@junobuild/core 15.36 KB (0%)
@junobuild/core-worker 21.76 KB (0%)
@junobuild/core-standalone 70.63 KB (0%)
@junobuild/utils 5.28 KB (0%)
@junobuild/errors 992 B (0%)
@junobuild/functions 2.19 KB (0%)
@junobuild/analytics 12.35 KB (0%)
@junobuild/config 7.15 KB (+0.07% 🔺)
@junobuild/auth/delegation 2.5 KB (0%)
@junobuild/auth/automation 760 B (0%)
@junobuild/cdn 968 B (0%)
@junobuild/storage 979 B (0%)
@junobuild/ic-client/actor 7.39 KB (0%)
@junobuild/ic-client/webauthn 1.96 KB (0%)
@junobuild/ic-client/utils 174 B (0%)
@junobuild/ic-client/index 62 B (0%)

@peterpeterparker peterpeterparker marked this pull request as ready for review April 10, 2026 16:17
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

Successfully merging this pull request may close these issues.

1 participant