mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
split up rollup input and output config to prevent warnings
This commit is contained in:
parent
73c0a92377
commit
395bd8e8d4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user