lustre-labs / dev-tools

Lustre's CLI and development tooling: zero-config dev server, bundling, and scaffolding.
55 stars 18 forks source link

Fix for Windows ESBuild issues #16

Closed Svaught598 closed 8 months ago

Svaught598 commented 8 months ago

Fixes #14!

I've tested this in an example project on my machine and everything works as expected. localhost:1234 opens up with a sample Lustre app.

I'm not sure how safe it is to list two file paths for the ESBuild binary. the location/name is different between platforms, so it feels like the likelihood of a single archive containing files at both paths is extremely slim. Maybe having a function that returns the expected binary path would make more sense here?

Is there a preferred way to solve this problem?

hayleigh-dot-dev commented 8 months ago

Maybe having a function that returns the expected binary path would make more sense here? Is there a preferred way to solve this problem?

maybe we could just check if we're on windows here and return the .exe path instead. Is that a windows thing, can't just name it esbuild?

Svaught598 commented 8 months ago

It seems that the filenames in the windows archives are actually esbuild.exe, so erl_tar is unable to detect it without that explicit extension. I pushed another commit to only use that filepath if the OS is windows, please let me know if any other changes are needed!

hayleigh-dot-dev commented 8 months ago

Ah right yeah gotcha. Looks grand, thank you!

hayleigh-dot-dev commented 8 months ago

I've published a v1.0.1 patch so you should be good to use this straight away :)