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

global const variables to primitives do not need to be FMCL'd #216

Open
samualtnorman opened this issue Nov 27, 2024 · 0 comments
Open

global const variables to primitives do not need to be FMCL'd #216

samualtnorman opened this issue Nov 27, 2024 · 0 comments

Comments

@samualtnorman
Copy link
Owner

const foo = "bar"

export default () => foo

becomes (with --no-minify)

function() {
  let _01ok1tkk9jd_G_ = #G
  if (!#FMCL) {
    _01ok1tkk9jd_G_.foo = "bar"
  }
  return _01ok1tkk9jd_G_.foo
}

which is a bit unnecessary

ideally it should just become

function() {
  let foo = "bar"
  return foo
}
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

1 participant