-
-
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
Issue importing es6 lodash module #166
Comments
Eek! Is that with 0.18.2 (latest version)? |
Yep, 0.18.2. It's very likely I'm doing something wrong. It's part of a larger project, so I need to parse this down into something simpler and reproducible to make sure. |
Judging by the error message it's caused by the fix for #164. Not quite sure how that's possible, but at least we know where to start looking... |
Off the top of my head my only guess would be that it's having issues with the backticks in the comment of uniq.js. The entire file is below:
|
Ok, I can reproduce it with just importing a single lodash module. You can run gobble against the repository here: https://github.com/timshannon/rollup-166 if you want to reproduce it. It also contains my full es6 build of lodash incase I'm doing something wrong with how I'm building it. |
Thanks! Fixed in 0.18.3. Was happening because of a multiple var declaration block: var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
objectTag = '[object Object]'; Multiple declarations get separated (so we don't end up including stuff we don't need), which means screwing around with the source in such a way that the locations of the string literals got obscured. Fixed by cropping the 'exclusion ranges' (which prevent multiline strings from being indented along with source code) to exclude the enclosing quotes. Prevented non-multiline strings from being included in that set of ranges in the first place, for good measure. |
Yep, it's working great for me now. Thanks, |
I've been using the es6 version of lodash in my project for a while and I use it like this:
It's been working fine for a while now, but I just updated rollup and now I'm getting the following error:
I'll see if I can build something reproducible when I get a chance.
The text was updated successfully, but these errors were encountered: