-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ts
More file actions
41 lines (39 loc) · 848 Bytes
/
build.ts
File metadata and controls
41 lines (39 loc) · 848 Bytes
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
import { Bundle, GenerateDts } from '@monitext-dev/builder';
import { dependencies } from './package.json';
Bundle({
mode: 'file',
targets: [
{
entry: './src/main.ts',
outfile: './dist/lib-min.js',
variant: ['cjs', 'esm'],
options: {
plateform: 'neutral',
minify: true,
minifySyntax: true,
minifyWhitespace: true,
eternal: [...Object.keys(dependencies)],
},
extraOpts: { mainFields: ['main'] },
},
{
entry: './src/main.ts',
outfile: './dist/lib-min-full.js',
variant: ['cjs', 'esm'],
options: {
plateform: 'neutral',
minify: true,
minifySyntax: true,
minifyWhitespace: true,
eternal: [],
},
extraOpts: { mainFields: ['main'] },
},
],
});
GenerateDts({
mode: 'file',
entry: './src/main.ts',
outfile: './dist/lib.ts',
tsconfig: './tsconfig.build.json',
});