-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
multi-var statement gets mangled [regression in 0.22.1] #390
Comments
ok thats simple, this occurs in 0.22.1 but not 0.22.0. In 0.22.0 I get the following output
|
👍 index.js import './a';
import './b'; a.js const a = 1, b = 2;
console.log(a, b); b.js const a = 2, b = 3;
console.log(a, b); Command: rollup rollup/index.js --export umd --id foo --name foo Output: const a = 1;
const b = 2;
console.log(a, b);
a$1 = 2; // Error
b$1 = 3; // Error
console.log(a$1, b$1); |
thanks @kobezzza for the repro-case |
Thanks for flagging this up. Looks like the latest version of magic-string is to blame – looking into it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately the code is closed source so I'll try and paint a picture of what is going on..
I'm using format iife and the
rollup-plugin-babel
all latest versions.I have code like..
fetch is a global and is used as a global in mockFetch, so I guess rollup needs to rename the
var fetch
but it becomes
which means that
fetch$1
isn't defined and the code falls over.This was working a couple of weeks ago so I'll try and figure out what version causes the issue.
The text was updated successfully, but these errors were encountered: