2022-12-11 21:44:52 +00:00
|
|
|
import type { BuildEntry } from 'unbuild'
|
|
|
|
import { defineBuildConfig } from 'unbuild'
|
2021-04-09 13:48:39 +00:00
|
|
|
|
2021-04-21 15:10:53 +00:00
|
|
|
export default defineBuildConfig({
|
2021-08-11 20:28:38 +00:00
|
|
|
declaration: true,
|
2021-04-09 13:48:39 +00:00
|
|
|
entries: [
|
2021-08-11 20:28:38 +00:00
|
|
|
// Core
|
|
|
|
{ input: 'src/index' },
|
|
|
|
// App
|
2023-03-11 21:16:01 +00:00
|
|
|
{ input: 'src/app/', outDir: 'dist/app/', ext: 'js' },
|
2021-08-11 20:28:38 +00:00
|
|
|
// Runtime dirs
|
|
|
|
...[
|
2022-04-07 11:28:04 +00:00
|
|
|
'core',
|
2022-04-05 14:51:55 +00:00
|
|
|
'head',
|
2023-01-11 20:51:49 +00:00
|
|
|
'components',
|
2021-08-11 20:28:38 +00:00
|
|
|
'pages'
|
2023-03-11 21:16:01 +00:00
|
|
|
].map(name => ({ input: `src/${name}/runtime/`, outDir: `dist/${name}/runtime`, format: 'esm', ext: 'js' } as BuildEntry))
|
2021-04-09 13:48:39 +00:00
|
|
|
],
|
2023-03-11 21:16:01 +00:00
|
|
|
hooks: {
|
|
|
|
'mkdist:entry:options' (_ctx, _entry, mkdistOptions) {
|
|
|
|
mkdistOptions.addRelativeDeclarationExtensions = true
|
|
|
|
}
|
|
|
|
},
|
2021-04-09 13:48:39 +00:00
|
|
|
dependencies: [
|
2021-08-11 20:28:38 +00:00
|
|
|
'nuxi',
|
|
|
|
'vue-router',
|
2022-11-15 14:33:43 +00:00
|
|
|
'ofetch'
|
2021-08-11 20:28:38 +00:00
|
|
|
],
|
|
|
|
externals: [
|
2023-02-14 00:22:42 +00:00
|
|
|
'nuxt',
|
2023-02-13 23:08:20 +00:00
|
|
|
'nuxt/schema',
|
2021-08-11 20:28:38 +00:00
|
|
|
'@vue/shared',
|
2023-03-08 15:32:24 +00:00
|
|
|
'@unhead/vue'
|
2021-04-09 13:48:39 +00:00
|
|
|
]
|
2021-04-21 15:10:53 +00:00
|
|
|
})
|