Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Use clean-modules to reduce the size of the package
Browse files Browse the repository at this point in the history
Reduces the size of the layer about 1.5 megs, not much, but PR's with more custom rules welcome :D, #24
https://github.com/duniul/clean-modules/blob/main/.cleanmodules-default is what is cleaned right now, plus d.ts files which are not needed in production
  • Loading branch information
Sparticuz committed Aug 22, 2022
1 parent 8f9852f commit 68e4797
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -19,6 +19,7 @@ test:
npm pack
mkdir -p nodejs/node_modules/@sparticuz/chrome-aws-lambda/
tar --directory nodejs/node_modules/@sparticuz/chrome-aws-lambda/ --extract --file sparticuz-chrome-aws-lambda-*.tgz --strip-components=1
npx clean-modules --directory nodejs --include "**/*.d.ts" --yes
rm sparticuz-chrome-aws-lambda-*.tgz
mkdir -p $(dir $@)
zip -9 --filesync --move --recurse-paths $@ nodejs
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -24,8 +24,9 @@
"preversion": "npm run build"
},
"devDependencies": {
"@types/node": "^16.11.48",
"@types/node": "^16.11.49",
"@types/tar-fs": "^2.0.1",
"clean-modules": "^2.0.6",
"puppeteer-core": "16.1.0",
"typescript": "^4.6.4"
},
Expand Down

0 comments on commit 68e4797

Please sign in to comment.