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

Importing lodash causes error #54

Closed
tyleralves opened this issue Jul 22, 2017 · 1 comment
Closed

Importing lodash causes error #54

tyleralves opened this issue Jul 22, 2017 · 1 comment

Comments

@tyleralves
Copy link

Importing or requiring lodash causes the plugin to error.

This may be because lodash depends on node.js?

Here is the error:

SyntaxError: Unexpected token '('. Expected a property name after '.'..
Plugin “Untitled”, line 1847:
»       return length ? arraybaseRandom.(0, length - 1)() : undefined;

@tyleralves
Copy link
Author

I think this is because lodash uses native NodeJS methods.

I only wanted specific lodash methods so I installed and imported them separately:
yarn add lodash.camelcase
import camelCase from 'lodash.camelCase';

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