improve demo styling

This commit is contained in:
Philipp Kühn
2021-08-26 23:03:31 +02:00
parent 6e71c08595
commit 4492d069bb
2 changed files with 15 additions and 4 deletions

View File

@@ -124,7 +124,18 @@ export default defineConfig({
}
})
return `export default ${JSON.stringify(files)}`
const sortedFiles = files.sort(item => {
if (
item.name.split('/').length === 0
&& basename(item.name).startsWith('index.')
) {
return -1
}
return 1
})
return `export default ${JSON.stringify(sortedFiles)}`
}
},
},