From 395bd8e8d4c02ac81e420c8ab8ff5253e3ad1bce Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 7 Aug 2020 10:08:08 +0200 Subject: [PATCH] split up rollup input and output config to prevent warnings --- scripts/build.mjs | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 6311eaa3..482f97b2 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -103,16 +103,12 @@ async function buildHtml(version, bundleName) { async function buildJs(bundleName) { // create js bundle - const rollupConfig = { - input: 'src/main.js', - output: { - file: path.join(targetDir, bundleName), - format: 'iife', - name: 'main' - } - }; - const bundle = await rollup.rollup(rollupConfig); - await bundle.write(rollupConfig); + const bundle = await rollup.rollup({input: 'src/main.js'}); + await bundle.write({ + file: path.join(targetDir, bundleName), + format: 'iife', + name: 'main' + }); } async function buildJsLegacy(bundleName) { @@ -133,15 +129,14 @@ async function buildJsLegacy(bundleName) { // create js bundle const rollupConfig = { input: 'src/main-legacy.js', - output: { - file: path.join(targetDir, bundleName), - format: 'iife', - name: 'main' - }, plugins: [commonjs(), nodeResolve(), babelPlugin] }; const bundle = await rollup.rollup(rollupConfig); - await bundle.write(rollupConfig); + await bundle.write({ + file: path.join(targetDir, bundleName), + format: 'iife', + name: 'main' + }); } async function buildOffline(version, bundleName) {