mirror of
https://github.com/actions/configure-pages.git
synced 2026-04-03 16:22:24 +00:00
Update config parser to support export default with identifier and add SvelteKit code
Co-authored-by: NatoBoram <natoboram@users.noreply.github.com>
This commit is contained in:
@@ -45,6 +45,20 @@ function getConfigParserSettings({ staticSiteGenerator, generatorConfigFile, pat
|
||||
pathPrefix: path
|
||||
}
|
||||
}
|
||||
case 'sveltekit':
|
||||
// SvelteKit does not want a trailing slash
|
||||
if (path.endsWith('/')) {
|
||||
path = path.slice(0, -1)
|
||||
}
|
||||
|
||||
return {
|
||||
configurationFile: './svelte.config.js',
|
||||
blankConfigurationFile: `${__dirname}/blank-configurations/sveltekit.js`,
|
||||
properties: {
|
||||
// Configure a base path
|
||||
'kit.paths.base': path
|
||||
}
|
||||
}
|
||||
default:
|
||||
throw `Unsupported static site generator: ${staticSiteGenerator}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user