We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bd990f commit 7ea51dcCopy full SHA for 7ea51dc
build.config.ts
@@ -1,3 +1,5 @@
1
+import fs from 'node:fs'
2
+import path from 'node:path'
3
import { defineBuildConfig } from 'unbuild'
4
5
export default defineBuildConfig({
@@ -21,4 +23,13 @@ export default defineBuildConfig({
21
23
rollup: {
22
24
inlineDependencies: true,
25
},
26
+ hooks: {
27
+ // workaround until this gets fixed
28
+ // https://github.com/nuxt/module-builder/issues/647
29
+ 'rollup:done': function (ctx) {
30
+ const dts = path.resolve(ctx.options.outDir, 'types.d.mts')
31
+ if (fs.existsSync(dts))
32
+ fs.cpSync(dts, path.resolve(ctx.options.outDir, 'types.d.ts'))
33
+ },
34
35
})
0 commit comments