From 1f799aa8fe52d048f92ee5137b1dc0acc700684c Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 17 Apr 2018 17:22:39 -0400 Subject: [PATCH] use new Function instead of eval, to prevent Rollup complaining --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 6178b1e45f..1b9fc8fa61 100644 --- a/src/index.ts +++ b/src/index.ts @@ -150,7 +150,7 @@ function create(source: string, _options: CompileOptions = {}) { } try { - return (0, eval)(compiled.js.code); + return (new Function(compiled.js.code))(); } catch (err) { if (_options.onerror) { _options.onerror(err);