This repository was archived by the owner on Dec 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 362
Package sizeΒ #342
Copy link
Copy link
Open
Description
Hello every one! Thanks for the awesome work.
I'm looking at the package size after running sls package:
serverless-graphql-dynamo.zip 10,5 MB
If you look into the .zip files you will find all the node_modules, with readme, test, src, etc. Is not there any way to get rid of all this dead weight?
If you remove:
const nodeExternals = require('webpack-node-externals');
...
externals: [nodeExternals()],
from webpack.config.js, you can go down to:
serverless-graphql-dynamo.zip 1,1 MB
And if you add uglifyjs-webpack-plugin, you can shrink the package to:
serverless-graphql-dynamo.zip 674 KB
Disclaimer: I have not tested if the service is working after deployment.
sid88in and martinbavio