Nuxt/packages/nuxt/build.config.ts

36 lines
792 B
TypeScript
Raw Permalink Normal View History

import type { BuildEntry } from 'unbuild'
import { defineBuildConfig } from 'unbuild'
2021-04-09 13:48:39 +00:00
export default defineBuildConfig({
declaration: true,
2021-04-09 13:48:39 +00:00
entries: [
// Core
{ input: 'src/index' },
// App
{ input: 'src/app/', outDir: 'dist/app/', ext: 'js' },
// Runtime dirs
...[
'core',
'head',
'components',
'pages',
].map(name => ({ input: `src/${name}/runtime/`, outDir: `dist/${name}/runtime`, format: 'esm', ext: 'js' } as BuildEntry)),
2021-04-09 13:48:39 +00:00
],
hooks: {
'mkdist:entry:options' (_ctx, _entry, mkdistOptions) {
mkdistOptions.addRelativeDeclarationExtensions = true
},
},
2021-04-09 13:48:39 +00:00
dependencies: [
'nuxi',
'vue-router',
'ofetch',
],
externals: [
2023-02-14 00:22:42 +00:00
'nuxt',
'nuxt/schema',
'@vue/shared',
'@unhead/vue',
],
})