-
Notifications
You must be signed in to change notification settings - Fork 152
feat: Esbuild Generic Command Builder #372
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
Conversation
| self._run_external_esbuild_in_nodejs(script) | ||
| return | ||
| if self._should_bundle_deps_externally(): | ||
| esbuild_command.build_with_no_dependencies() |
There was a problem hiding this comment.
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.
qingchm
left a comment
There was a problem hiding this 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
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.jsonand 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.