Skip to content
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

Replace deprecated terser plugin #1423

Merged
merged 6 commits into from
Aug 19, 2024
Merged

Replace deprecated terser plugin #1423

merged 6 commits into from
Aug 19, 2024

Conversation

surma
Copy link
Collaborator

@surma surma commented Aug 7, 2024

rollup-plugin-terser has been long deprecated and replaced by @rollup/plugin-terser.

I discovered this during some Wasm work, where Emscripten now emits code using ??= which the older terser does not understand. The switch to @rollup/plugin-terser fixes that.

There are lots of outdated dependencies, but rather than do a massive PR I figured I’d do it one step at a time.

@surma
Copy link
Collaborator Author

surma commented Aug 7, 2024

... Turns out we were also still on Node 14 in .nvmrc, which doesn’t have someArray.at(), which the terser plugin relies on.

So this PR also updates to Node 20 LTS.

@surma
Copy link
Collaborator Author

surma commented Aug 7, 2024

No idea why Windows is failing or what I need to do to fix it 😕

@aryanpingle
Copy link
Contributor

Judging purely from the error report, this could be the issue? It's a breaking change in node for Windows users

@surma
Copy link
Collaborator Author

surma commented Aug 13, 2024

@aryanpingle Great find! That seems to have resolved that issue, however now there’s a new path issue 🙄

I’ll see if I can spin up a Windows workstation somewhere...

@aryanpingle
Copy link
Contributor

aryanpingle commented Aug 18, 2024

@surma GH actions runs npm run build, not npm run dev - so it hasn't caught the fact that you can't set env vars like DEV_PORT=\"${DEV_PORT:=5000}\" on Windows. Can we go back to the hardcoded --listen=5000?

In the future if we need to use the port number elsewhere we can just declare it separately

@jakearchibald jakearchibald merged commit e8d35e0 into dev Aug 19, 2024
11 checks passed
@jakearchibald jakearchibald deleted the terser-plugin branch August 19, 2024 07:50
@jakearchibald
Copy link
Collaborator

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants