-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
39 lines (37 loc) · 1.27 KB
/
build.config.ts
File metadata and controls
39 lines (37 loc) · 1.27 KB
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
29
30
31
32
33
34
35
36
37
38
39
/**
* Build configuration for the Ollama Native project
* @fileoverview Configuration for unbuild bundler with TypeScript support
*/
import { defineBuildConfig } from 'unbuild'
import { resolve } from 'path'
/**
* Build configuration object
* @description Defines the build settings for bundling TypeScript source files
* @returns {import('unbuild').BuildConfig} The build configuration
*/
export default defineBuildConfig({
/** @type {string[]} Entry points for the build process */
entries: ['src/index'],
/** @type {boolean} Whether to generate TypeScript declaration files */
declaration: true,
/** @type {boolean} Whether to clean the output directory before building */
clean: true,
/**
* Path aliases for module resolution
* @type {Record<string, string>} Map of alias names to their resolved paths
*/
alias: {
/** @type {string} Alias for interfaces directory */
'@interfaces': resolve(__dirname, 'src/interfaces'),
/** @type {string} Alias for utilities directory */
'@utils': resolve(__dirname, 'src/utils')
},
rollup: {
emitCJS: true,
inlineDependencies: true
},
/** @type {boolean} Whether to generate source maps */
sourcemap: false,
/** @type {boolean} Whether to fail the build on warnings */
failOnWarn: false
})