-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.config.ts
More file actions
37 lines (36 loc) · 1.13 KB
/
build.config.ts
File metadata and controls
37 lines (36 loc) · 1.13 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
import { defineBuildConfig } from 'unbuild'
export default defineBuildConfig({
entries: [
{ input: './src/index', name: 'index' },
{ input: './src/hooks/index', name: 'hooks' },
{ input: './src/hooks/state/index', name: 'hooks/state' },
{ input: './src/hooks/lifecycle/index', name: 'hooks/lifecycle' },
{ input: './src/hooks/performance/index', name: 'hooks/performance' },
{ input: './src/hooks/events/index', name: 'hooks/events' },
{ input: './src/hooks/api-dom/index', name: 'hooks/api-dom' },
{ input: './src/components/index', name: 'components' },
{ input: './src/utils/exports', name: 'utils' },
],
clean: true,
declaration: true,
externals: ['react', 'react-dom', 'react/jsx-runtime'],
rollup: {
emitCJS: true,
esbuild: {
jsx: "automatic",
target: 'es2020',
minify: true,
minifyWhitespace: true,
minifySyntax: true,
minifyIdentifiers: true,
treeShaking: true,
legalComments: 'none' as const,
}
},
sourcemap: false,
failOnWarn: true,
outDir: 'dist',
replace: {
__DEV__: "process.env.NODE_ENV !== 'production'"
}
})