const rollup = require('rollup')
const inputOptions = require('./input')
const outputOptions = require('./output')
async function rollupBuild(input, output) {
const bundle = await rollup.rollup(input) // 根据input配置进行打包
console.log(`正在生成:${output.file}`)
await bundle.write(output) // 根据output配置输出文件
console.log(`${output.file}生成成功!`)
}
(async function () {
for (let i = 0; i < outputOptions.length; i++) {
await rollupBuild(inputOptions, outputOptions[i])
}
})()
请问下老师我和你的配置是一样的。。和官网也是一样
build的时候总是提醒
[!] Error: Config file must export an options object, or an array of options objectshttps://rollupjs.org/guide/en/#configuration-files
我看官网都没有export,为什么一直error