mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix(templates): export types in dev mode
This commit is contained in:
@@ -68,8 +68,8 @@ export function addTemplates(options: ModuleOptions, nuxt: Nuxt) {
|
||||
return [
|
||||
`import template from ${JSON.stringify(fileURLToPath(new URL(`./theme/${kebabCase(component)}`, import.meta.url)))}`,
|
||||
`const result = typeof template === 'function' ? template(${JSON.stringify(options)}) : template`,
|
||||
`export default result`,
|
||||
`/* export default ${json} */`
|
||||
`const json = ${json}`,
|
||||
`export default result as typeof json`
|
||||
].join('\n')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user