forked from kyubisation/angular-t9n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rollup.config.mjs
51 lines (49 loc) · 1.2 KB
/
rollup.config.mjs
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
44
45
46
47
48
49
50
51
import ts from 'rollup-plugin-ts';
export default [
target({ input: './builders/t9n/index.ts', exports: 'named' }),
target({ input: './bin/index.ts' }),
target({ input: './server/index.ts' }),
target({ input: './schematics/ng-add/index.ts' }),
target({ input: './schematics/resolve-ng-locales/index.ts' }),
];
function target({ input, exports = 'auto' }) {
return {
input,
output: {
file: input.replace(/\.ts$/, '.js'),
exports,
format: 'cjs',
},
external: [
'@angular-devkit/architect',
'@angular-devkit/core',
'@angular-devkit/core/node',
'@angular-devkit/schematics',
'@nestjs/common',
'@nestjs/core',
'@nestjs/platform-ws',
'@nestjs/websockets',
'@nestjs/serve-static',
'@schematics/angular/utility/workspace',
'@schematics/angular/utility/workspace-models',
'@xmldom/xmldom',
'class-validator',
'fs',
'js-levenshtein',
'os',
'path',
'rxjs',
'rxjs/operators',
'util',
'../../../server',
'../../server',
'../server',
],
plugins: [
ts({
browserslist: false,
tsconfig: 'tsconfig.node.json',
}),
],
};
}