use new Function instead of eval, to prevent Rollup complaining

pull/7738/head
Rich Harris 8 years ago
parent b72225a28f
commit 1f799aa8fe

@ -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);

Loading…
Cancel
Save