-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.config.ts
More file actions
28 lines (27 loc) · 593 Bytes
/
Copy pathbuild.config.ts
File metadata and controls
28 lines (27 loc) · 593 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { defineBuildConfig } from 'unbuild'
// @ts-expect-error no types
import { string } from 'rollup-plugin-string'
export default defineBuildConfig({
entries: ['src/index'],
clean: false,
declaration: true,
externals: ['vite', 'fs'],
rollup: {
emitCJS: true,
inlineDependencies: true,
dts: {
respectExternal: true,
},
},
hooks: {
'rollup:options': function (_ctx, options) {
if (Array.isArray(options.plugins)) {
options.plugins.push(
string({
include: '**/*.ejs',
}),
)
}
},
},
})