Open krimeshu opened 7 years ago
Oh, dear. I had a feeling I should have been taking a more general-purpose approach when I implemented options.separateCaches
.
I think I'll address this with a default/override system. Something like this (though the option will likely have some other name which I haven't come up with yet, rather than options.options
, which is weird):
gulp.src('./src/js/*.js')
.pipe(rollup({
options: [
{
entry: 'module-entry-1.js',
moduleName: 'moduleEntry1'
},
{
entry: 'module-entry-2.js',
moduleName: 'moduleEntry2'
}
],
format: 'iife'
})
.pipe(gulp.desc('./desc'));
What do you think?
It's also a good idea. With this options, we can set more options for each entry file. But it might bring some compatibility issues, if someone use old options with a new version module.
Old options won't have the new property, so they'll behave just like they always have.
:) That will be nice, hope to see the new solutions soon~
With multiple entry point, and use
IIFE
format output, but I found I can not set multiple module name for each one.Here is my situation:
gulp-rollup
just cloned the original options, and reset entry in a map function. CountmoduleName
be processed in the map function together?