-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lambda-nodejs: parcel is too big to bundle #6340
Comments
@jogold what do you think? |
Yes, peer dependency is fine. What do you mean with [undeclared]? |
I mean that we won't be able to officially declare it as a "peerDependency" in our package.json because jsii doesn't really know what to do with it, so basically I think at runtime we can do something like |
OK, let me open a PR for this. |
Awesome, thanks! |
Stop bundling `parcel-bundler` and make it an undeclared peer dependency. Transform `build` function into a class. Fixes aws#6340 BREAKING CHANGE: `parcel-bundler` v1.x is now a peer dependency of `@aws-cdk/aws-lambda-nodejs`. Please add it to your `package.json`.
Stop bundling parcel-bundler and make it an undeclared peer dependency. Transform build function into a class. Fixes #6340 BREAKING CHANGE: parcel-bundler v1.x is now a peer dependency of @aws-cdk/aws-lambda-nodejs. Please add it to your package.json.
We are looking into releasing the entire AWS CDK as a single library (see aws/aws-cdk-rfcs#6). This basically means that all modules (and their transitive dependencies) will be bundled into a single package.
Recently, we have introduced @aws-cdk/aws-lambda-nodejs as a high level API for writing node.js lambda functions. This construct uses [parcel] in order to bundle all function's dependencies into a single artifact.
The problem is that [parcel] is too big:
This is unrealistic and also introduces an intrinsic security risk posed by including so many dependencies in our project.
Proposal
Let's use parcel as an [undeclared] peer-dependency. Simply require that users declare parcel in their own
package.json
file. It will also give them more control over which version to use.The text was updated successfully, but these errors were encountered: