question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Avoid eval for Rollup.js

See original GitHub issue

Hi guys, I’m currently using the branch-sdk with rollup.js but I get the following error:

rollup: Use of eval (in /home/gp2mv3/www/covevent/refonte2/ionic/node_modules/branch-sdk/dist/build.min.js) is strongly discouraged, as it poses security risks and may cause issues with minification. See https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval for more details

Why is eval used ? Isn’t there other solutions ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Gp2mv3commented, Nov 2, 2016

Guys you’re awesome ! Your customer service and relation with developers are really cool. 😉

1reaction
yntemacommented, Nov 1, 2016

@Gp2mv3 after looking into it a little more, we determined that this is most likely caused by using JSON.parse in a couple of locations. We have a safejson.parse method that should be used instead. We will do some testing and hopefully get this fixed in the next deploy. Thanks for notifying us on this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to prevent unsafe eval in a rollup bundle - Stack Overflow
I have csp header added from server side which doesn't contain script-src unsafe-eval . I even faced same issue in webpack but i...
Read more >
rollup.js
Avoiding eval. You probably already know that ' eval is evil', at least according to some people. But it's particularly harmful with Rollup,...
Read more >
How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >
rollup.js
Introduction. Overview. Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, ...
Read more >
Scope hoisting - Parcel
Avoid eval ... The eval function executes arbitrary JavaScript code in a string within the current scope. This means Parcel cannot rename any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found