-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
18 lines (17 loc) · 646 Bytes
/
Copy pathbuild.config.ts
File metadata and controls
18 lines (17 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { cpSync } from 'node:fs'
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: [
{ builder: 'mkdist', input: './src', pattern: ['**/*.css', '!stories/**', '!tests/**'], loaders: ['postcss'] },
{ builder: 'mkdist', input: './src', pattern: ['**/*.vue', '!stories/**', '!tests/**'], loaders: ['vue'] },
{ builder: 'mkdist', input: './src', pattern: ['**/*.ts', '!stories/**', '!tests/**'], format: 'esm', loaders: ['js'] },
],
clean: true,
declaration: true,
externals: ['vue'],
hooks: {
'build:done': () => {
cpSync('src/shapes.json', 'dist/shapes.json')
},
},
})