You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most basic npm script I could come up with is babel dev.js -o build.js. For now, I'm using a simple workaround where I define the array in a higher scope, but it's bad programming. I was thinking of maybe using a reducer instead, but I figured this was worth opening an issue anyways.
For a concrete test, try cloning this repo https://github.com/rykdesjardins/lilium-text, run npm install && npm run build, and open the build/liliumtext.js file. You can find another of a similar issue example if you search for the function called createSelectionContext under LiliumText.
Let me know if you need any additional information!
The text was updated successfully, but these errors were encountered:
rykdesjardins
changed the title
Constants defined before a while-loop are moved out of scope
Constants defined before a while-loop are removed or moved out of scope
Feb 28, 2018
@vigneshshanmugam Quick comment to let you know I appreciate what you guys are doing. I feel the open source community doesn't thank the brightest minds like you enough for all the innovation.
Sending love from Canada. Thanks for working on this!
I saw this was fixed and merged in #713, but I can't seem to make it work. Using version
0.3.0
from npm, on Linux.The smallest code snippet I could come up with is the following.
REPL - Try it here
To reproduce, we need a variable defined before a while loop, a while loop, and to refer to the previously defined variable.
Actual Output
Expected Output
Something similar to this.
Details
For the babelrc, I'm only using two presets.
I believe this is coming from the following sub-package (plugin) : https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-merge-sibling-variables. Might take a look at it and see if I can actually contribute and fix.
The most basic npm script I could come up with is
babel dev.js -o build.js
. For now, I'm using a simple workaround where I define the array in a higher scope, but it's bad programming. I was thinking of maybe using a reducer instead, but I figured this was worth opening an issue anyways.For a concrete test, try cloning this repo https://github.com/rykdesjardins/lilium-text, run
npm install && npm run build
, and open the build/liliumtext.js file. You can find another of a similar issue example if you search for the function calledcreateSelectionContext
underLiliumText
.Let me know if you need any additional information!
The text was updated successfully, but these errors were encountered: