From 20581630ddae641d4a5c8eed0ba37ad8837547a3 Mon Sep 17 00:00:00 2001 From: sy-records <52o@qq52o.cn> Date: Thu, 13 Aug 2020 20:44:45 +0800 Subject: [PATCH] fix: fix CompileError --- build/build.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build/build.js b/build/build.js index 563861373..0de786828 100644 --- a/build/build.js +++ b/build/build.js @@ -22,7 +22,10 @@ async function build(opts) { .rollup({ input: opts.input, plugins: (opts.plugins || []).concat([ - buble(), + buble({ + transforms: { + dangerousForOf: true + }}), commonjs(), nodeResolve(), replace({ @@ -33,8 +36,8 @@ async function build(opts) { onwarn: function (message) { if (message.code === 'UNRESOLVED_IMPORT') { throw new Error( - `Could not resolve module ` + - message.source + + `Could not resolve module ` + + message.source + `. Try running 'npm install' or using rollup's 'external' option if this is an external dependency. ` + `Module ${message.source} is imported in ${message.importer}` )