split up rollup input and output config to prevent warnings

This commit is contained in:
Bruno Windels 2020-08-07 10:08:08 +02:00
parent 73c0a92377
commit 395bd8e8d4

View File

@ -103,16 +103,12 @@ async function buildHtml(version, bundleName) {
async function buildJs(bundleName) {
// create js bundle
const rollupConfig = {
input: 'src/main.js',
output: {
const bundle = await rollup.rollup({input: 'src/main.js'});
await bundle.write({
file: path.join(targetDir, bundleName),
format: 'iife',
name: 'main'
}
};
const bundle = await rollup.rollup(rollupConfig);
await bundle.write(rollupConfig);
});
}
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) {