-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
43 lines (41 loc) · 1.52 KB
/
build.config.ts
File metadata and controls
43 lines (41 loc) · 1.52 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
40
41
42
43
/**
* Build configuration for the Stateless JS 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', 'src/react', 'src/svelte', 'src/vue', 'src/angular'],
/** @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 root directory */
'@root': resolve(__dirname, 'src'),
/** @type {string} Alias for core directory */
'@core': resolve(__dirname, 'src/core'),
/** @type {string} Alias for interfaces directory */
'@interfaces': resolve(__dirname, 'src/interfaces'),
/** @type {string} Alias for middlewares directory */
'@middlewares': resolve(__dirname, 'src/middlewares')
},
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
})