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

ESBuild define setting transformed incorrectly #23

Closed
jimrandomh opened this issue Dec 20, 2020 · 2 comments
Closed

ESBuild define setting transformed incorrectly #23

jimrandomh opened this issue Dec 20, 2020 · 2 comments

Comments

@jimrandomh
Copy link

Our ESBuild config for a client bundle contains an option that looks like:

  define: {
    "global": "window"
  }

When using ESBuild directly, this works as expected (the global identifier is replaced with window in some libraries that had weird expectations about their environment). Estrella, however, transforms the settings like this (estrella.js:575):

  for (let k in define) {
    define[k] = json(define[k])
  }

This causes global to be replaced with the string "window" instead of the token window, causing a crash on start.

jimrandomh added a commit to ForumMagnum/ForumMagnum that referenced this issue Dec 21, 2020
See: rsms/estrella#23 . I just reported the
issue today, and it's a pretty easy fix, so we probably won't have to
stay on the forked version for long.
@rsms rsms closed this as completed in 27fedd6 Mar 11, 2021
@rsms
Copy link
Owner

rsms commented Mar 11, 2021

Thanks for the issue report. Fix will be included in the next release.

rsms added a commit that referenced this issue Mar 11, 2021
@rsms
Copy link
Owner

rsms commented Mar 12, 2021

Shipped with release 1.4.0

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

No branches or pull requests

2 participants