mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
fix(templates): include .d.mts
declarations
This commit is contained in:
parent
6129711802
commit
1086bf0018
@ -146,6 +146,7 @@ export const RenderPlugin = () => {
|
||||
// Write new template
|
||||
await fsp.writeFile(fileName.replace('/index.html', '.mjs'), `${jsCode}\nexport const template = _template`)
|
||||
await fsp.writeFile(fileName.replace('/index.html', '.vue'), vueCode)
|
||||
await fsp.writeFile(fileName.replace('/index.html', '.d.mts'), `${types}`)
|
||||
await fsp.writeFile(fileName.replace('/index.html', '.d.ts'), `${types}`)
|
||||
|
||||
// Remove original html file
|
||||
@ -158,6 +159,7 @@ export const RenderPlugin = () => {
|
||||
await fsp.writeFile(r('dist/index.mjs'), contents, 'utf8')
|
||||
|
||||
await fsp.writeFile(r('dist/index.d.ts'), replaceAll(contents, /\.mjs/g, ''), 'utf8')
|
||||
await fsp.writeFile(r('dist/index.d.mts'), replaceAll(contents, /\.mjs/g, ''), 'utf8')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user