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:
AndrewLester
2022-08-09 20:26:30 -04:00
parent c61e34fb27
commit c872edcdfb
11 changed files with 81 additions and 6 deletions

View File

@@ -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}`
}