配置Rollupjs生成库时,如果输入是由多个javascript文件组成的数组。我们如何才能将这些输入生成为一个输出 js 文件呢?
export const lgService = {
input: [
'./src/app/services/livegiver/lgservices.js',
'./src/app/services/readable-stream.js'
],
output: {
file: outputPath + 'LiveGiver/index.js',
format: 'es'
}
}
Run Code Online (Sandbox Code Playgroud)
预期的:
Input: [a.js, b.js]
Output: dist/index.js
Run Code Online (Sandbox Code Playgroud)
实际的:
Input: [a.js, b.js]
Output: dist/a.js; dist/b.js
Run Code Online (Sandbox Code Playgroud)