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
Upon transforming imports, they are not hoisted to the top of the file, which leads to different meaning/behavior in the original file and the transformed file.
For example,
console.log(foo);import{foo}from'bar';
(which is perfectly valid) is transformed to
__shimport__.define('demo.js',['bar'],function(__import,__exports,__dep_0){console.log(foo);varfoo=__dep_0.foo;/*import { foo } from 'bar'*/;});
(which has different behavior from the original code, as foo will still be undefined during the console.log(foo)).
This was, as far as I can tell, the real underlying bug behind sveltejs/sapper#1593 and fixing this would likely be more desirable than the change in sveltejs/sapper#1595 was.
The text was updated successfully, but these errors were encountered:
Upon transforming
import
s, they are not hoisted to the top of the file, which leads to different meaning/behavior in the original file and the transformed file.For example,
(which is perfectly valid) is transformed to
(which has different behavior from the original code, as
foo
will still be undefined during theconsole.log(foo)
).This was, as far as I can tell, the real underlying bug behind sveltejs/sapper#1593 and fixing this would likely be more desirable than the change in sveltejs/sapper#1595 was.
The text was updated successfully, but these errors were encountered: