Allow using Parcel 2 for NodejsFunction
See original GitHub issueRight now, the documentation requires running Parcel^1
There are bug fixes, such as this one (https://github.com/parcel-bundler/parcel/issues/3151#issuecomment-553325935) 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: https://github.com/parcel-bundler/parcel/issues/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: https://github.com/parcel-bundler/parcel/issues/3151#issuecomment-618453216
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 https://github.com/DataDog/datadog-lambda-layer-js/issues/73 with the package that’s pulling aws-xray-sdk-node for more context.
- 👋 I may be able to implement this feature request
- ⚠️ This feature might incur a breaking change
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
@jogold Could we allow users to fully customize their bundling step once we have docker based bundling?
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.