24 lines
504 B
JavaScript
Raw Permalink Normal View History

2021-12-25 14:39:47 +01:00
const rollup = require('rollup')
const configs = require('./build-config.js')()
const build = () => {
configs.forEach(async file => {
const bundle = await rollup.rollup(file.inputOptions)
const { output } = await bundle.generate(file.outputOptions)
2021-12-25 14:39:47 +01:00
for (const chunkOrAsset of output) {
if (chunkOrAsset.type === 'asset') {
// ...
} else {
// ...
}
}
2021-12-25 14:39:47 +01:00
await bundle.write(file.outputOptions)
})
2021-12-25 14:39:47 +01:00
console.log('BUILD PLUGINS ==> Bundling Done 🎉')
2021-12-25 14:39:47 +01:00
}
module.exports = build