Skip to content

Commit

Permalink
build(cli): reduce bundle size
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Aug 9, 2023
1 parent 8d99303 commit 91c650a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ codecov
commitlintrc
dedupe
defu
dequal
dessant
dists
dohm
Expand All @@ -18,6 +19,7 @@ gpgsign
hmarr
iife
infile
iterare
keyid
ksort
larsgw
Expand Down
15 changes: 15 additions & 0 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@ const config: Config = defineBuildConfig({
sourcemap: true
},
{
alias: {
'@flex-development/errnode': '@flex-development/errnode',
'@flex-development/mlly': '@flex-development/mlly',
'@flex-development/pathe': '@flex-development/pathe',
'@flex-development/tutils': '@flex-development/tutils',
commander: 'node_modules/commander/esm.mjs',
dequal: 'dequal',
iterare: 'node_modules/@nestjs/common/node_modules/iterare',
lodash: 'lodash-es',
tslib: 'tslib',
uid: 'node_modules/@nestjs/common/node_modules/uid'
},
bundle: true,
external: [
'@babel/*',
'@nestjs/microservices',
'@nestjs/platform-express',
'@nestjs/websockets/socket-module',
'cache-manager',
'class-transformer',
'class-validator',
'node-fetch',
'reflect-metadata',
'rxjs'
],
keepNames: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"is-ci": "3.0.1",
"jsonc-eslint-parser": "2.3.0",
"lint-staged": "13.2.3",
"lodash-es": "4.17.21",
"memfs": "4.2.1",
"mri": "1.2.0",
"nest-commander": "3.11.1",
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ __metadata:
is-ci: "npm:3.0.1"
jsonc-eslint-parser: "npm:2.3.0"
lint-staged: "npm:13.2.3"
lodash-es: "npm:4.17.21"
memfs: "npm:4.2.1"
mri: "npm:1.2.0"
nest-commander: "npm:3.11.1"
Expand Down Expand Up @@ -7187,6 +7188,13 @@ __metadata:
languageName: node
linkType: hard

"lodash-es@npm:4.17.21":
version: 4.17.21
resolution: "lodash-es@npm:4.17.21"
checksum: d1c3ee94118daeeee47c630ab5f91e94cc4e41ebe2452d837edbe599e853eb2d4be7edf82b4fe62f9fc74f27a8ed7f82fdbd9d301d0acef88f00941db64c4843
languageName: node
linkType: hard

"lodash.camelcase@npm:^4.3.0":
version: 4.3.0
resolution: "lodash.camelcase@npm:4.3.0"
Expand Down

0 comments on commit 91c650a

Please sign in to comment.