Nuxt/packages/nuxt/build.config.ts
2023-02-14 00:22:42 +00:00

32 lines
647 B
TypeScript

import type { BuildEntry } from 'unbuild'
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
declaration: true,
entries: [
// Core
{ input: 'src/index' },
// App
{ input: 'src/app/', outDir: 'dist/app/' },
// Runtime dirs
...[
'core',
'head',
'components',
'pages'
].map(name => ({ input: `src/${name}/runtime/`, outDir: `dist/${name}/runtime`, format: 'esm' } as BuildEntry))
],
dependencies: [
'nuxi',
'vue-router',
'ofetch'
],
externals: [
'nuxt',
'nuxt/schema',
'@vue/reactivity',
'@vue/shared',
'@vueuse/head'
]
})