-
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
Allow using Parcel 2 for NodejsFunction #7779
Comments
Hi @blimmer The reason is that Parcel v2 is still in alpha (https://www.npmjs.com/package/parcel?activeTab=versions, https://github.com/parcel-bundler/parcel/projects/5). Not totally comfortable to use an alpha version for this construct. To be updated when Parcel officially releases v2. |
@jogold Could we allow users to fully customize their bundling step once we have docker based bundling? |
In response to @eladb, I would prefer co-locating my lambdas in a
Parcel would then need to bundle each lambda using the configs ( |
Can we resolve this? |
Yes |
Thank you very much! I'm looking forward to the next release to try this out 😄 🎉 |
Right now, the documentation requires running Parcel^1
aws-cdk/packages/@aws-cdk/aws-lambda-nodejs/README.md
Lines 17 to 21 in f3219c3
There are bug fixes, such as this one (parcel-bundler/parcel#3151 (comment)) that are only made to Parcel v2 and not v1.
Use Case
The aws-xray-sdk-node package relies on
async_hooks
, and as described in this bug report: parcel-bundler/parcel#3151 , fails to build under Parcel ^1. @gergan actually reported on that issue that he needs a workaround specifically because of the CDK's NodejsFunction reliance on Parcel v1: parcel-bundler/parcel#3151 (comment)Proposed Solution
Allow using Parcel ^2. I'm not sure why the docs peg to v1 right now - I'm assuming there's a reason that v2 was incompatible for some reason. If it's actually compatible with v2, then we could also update the docs referenced above.
Other
I created a sample repo to show the problem with Parcel here (see the README). I also filed DataDog/datadog-lambda-js#73 with the package that's pulling aws-xray-sdk-node for more context.
This is a 🚀 Feature Request
The text was updated successfully, but these errors were encountered: