Skip to content

Conversation

@mildaniel
Copy link
Contributor

Description of changes:
These changes create a generic command builder to handle the three types of esbuild flags that are part of the esbuild CLI API. This PR also removes the workaround of calling a separate Node.js script to mark all dependencies as external, instead we go through the package.json and mark all dependencies there as external individually.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

self._run_external_esbuild_in_nodejs(script)
return
if self._should_bundle_deps_externally():
esbuild_command.build_with_no_dependencies()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of calling the external Node.js plugin to handle this, which would require us to update the Node.js template each time, we just make a list of all dependencies in the package.json file and set those to external.

@mildaniel mildaniel marked this pull request as ready for review July 6, 2022 00:05
@mildaniel mildaniel requested a review from mndeveci July 7, 2022 16:12
Copy link
Contributor

@qingchm qingchm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes from peer review session: since for other bundler configs we only add in default ones if the flag is not present, we discussed the possibility of having to handle duplicate external flags when building with no dependencies. A quick check on if duplicate arguments cause any unexpected behaviour would be helpful

@mildaniel mildaniel merged commit 64f478f into aws:develop Jul 8, 2022
@mildaniel mildaniel deleted the esbuild-command-builder branch July 8, 2022 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants