use new Function instead of eval, to prevent Rollup complaining

pull/1348/head
Rich Harris 7 years ago
parent 5a457bfb87
commit 69c41a0373

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