Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Config option to define Node.js build directory #647

Open
bram-l opened this issue Sep 9, 2021 · 2 comments
Open

Config option to define Node.js build directory #647

bram-l opened this issue Sep 9, 2021 · 2 comments

Comments

@bram-l
Copy link

bram-l commented Sep 9, 2021

- Do you want to request a feature or report a bug?
Feature

- What is the current behavior?
When Node.js functions are built with source maps enabled the hash of the ZIP file will be different each time because the name of the temporary build folder is included in the source map.

In our deployment pipeline we are using Terraform with the source_code_hash argument to detect code changes, but this is now different for each deployment regardless of any change being made.

- What is the expected behavior?
Being able to supply a build directory, similar to the rustTargetDirectory would resolve this issue.

- Please mention your node.js, and operating system version.
Node.js v14

@bram-l
Copy link
Author

bram-l commented Sep 23, 2021

I just came across this PR evanw/esbuild#1234

@eduardoboucas is it correct that this would also fix the issue? Ideally the source map uses paths relative to the source root instead of using the temporary build directory as absolute path

@eduardoboucas
Copy link
Member

Hi @bram-l! Thanks for raising this and apologies for the slow response.

The esbuild PR you linked would indeed solve this issue, and I think it'd be the best course of action. We can integrate it into Netlify's fork of esbuild.

I'm afraid I don't have an exact timeline for this, but I'll make sure to keep this issue updated with any progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants