Breaking change since ESBuild >0.16 chore commit
Pull Request Description
ESBuild build got bumped in this commit https://github.com/project-error/fivem-typescript-boilerplate/commit/db0059b1ed817e3e21607373ef7a8d7f3c1714ae leading to a breaking change.
ESBuild 0.17 introduced a breaking (backwards-incompatible) change to .build() - SEE HERE
Chore commit was blindly merged breaking the watch and build commands.
This basically makes it work with latest esbuild and simplifies the build-bundle.js.
(Edit side note: I used npm hence the lock file. Welcome to delete or ignore it. The main important part is the build-bundle.js)
Pull Request Checklist:
- [x] Have you followed the guidelines in our contributing document and Code of Conduct?
- [x] Have you checked to ensure there aren't other open for the same update/change?
- [x] Have you built and tested the
resourcein-game after the relevant change?
~~Just tested with Yarn and it seems to break. I'm investigating the cause and will update this PR with a fix for yarn~~
Its actually due to this https://github.com/project-error/fivem-typescript-boilerplate/issues/32 I suggest ignoring this PR and rolling back on the ESBuild version until FiveM updates node.
@itschip I think this can be implemented now, will prevent people from getting errors in build mode. Since updating it or not won't have any effect on #32 anyway, better fix manual builds.
Seems like you've installed some packages with npm instead of yarn. Please remove the package-lock file and install again with yarn to update the yarn.lock file :P
Seems like you've installed some packages with npm instead of yarn. Please remove the package-lock file and install again with yarn to update the yarn.lock file :P
This PR is pretty old, so if you want I'll make a new one with the requested changes. I doubt the author is still active 😄
I'm alive and kicking. I just didn't reply to the original comments - must have lost them in the email spam.
~Just tested with Yarn and it seems to break. I'm investigating the cause and will update this PR with a fix for
yarn~Its actually due to this #32 I suggest ignoring this PR and rolling back on the ESBuild version until FiveM updates node.
I've left a comment explaining that this PR can be ignored until ESBuild version is increased by FiveM. Since the node version is unsupported by peer dependencies etc.
I can make changes if needed but yeah as per above.
Edit: Instead the version of ESBuild should be rolled back since its a breaking change and FiveM doesn't support it.
I'm alive and kicking. I just didn't reply to the original comments - must have lost them in the email spam.
~Just tested with Yarn and it seems to break. I'm investigating the cause and will update this PR with a fix for
yarn~ Its actually due to this #32 I suggest ignoring this PR and rolling back on the ESBuild version until FiveM updates node.I've left a comment explaining that this PR can be ignored until ESBuild version is increased by FiveM. Since the node version is unsupported by peer dependencies etc.
I can make changes if needed but yeah as per above.
Edit: Instead the version of ESBuild should be rolled back since its a breaking change and FiveM doesn't support it.
We can roll back the version of ESBuild, but I'm quite sure that NPWD is not meant to be built on the server in the first place. Thus, I think it would be fine, but I also agree that the impact of downgrading is pretty much nothing, so I'm going to agree.
While NPWD may not be impacted - this repo is meant to act as a boilerplate (as far as I understand) which in its current form it isn't, therefore it shouldn't be public and/or exist. Most beginners/average users will be met with frustration and errors, as the issue when using this standalone is not obvious since its the FiveM Node version at fault.
I'm also going to say on a whim that NPWD probably has its own esbuild stuff in its repo and is not using this either directly or indirectly in any shape or form, hence rolling back on the esbuild will not impact NPWD.
Best approach (imo) would be to roll it back close this PR and mention that this ESBuild version is a strict dependency linking to this PR and the discussion.
I hope that clarifies why I left the discussion open :)
I totally forgot that this was about the boilerplate, my apologies 😂
Your solution is good, I agree.