Update rollup options object

This commit is contained in:
Andreas Hocevar
2017-08-20 11:55:45 -04:00
parent 400f754e44
commit bd098c7821

View File

@@ -49,9 +49,7 @@ function main() {
const options = {
extend: true,
entry: require.resolve(ext.module),
dest: `${path.join(__dirname, '..', 'build', 'ol.ext', moduleName.toLowerCase())}.js`,
format: 'iife',
moduleName: moduleName,
exports: 'named',
plugins: [
node(),
@@ -60,7 +58,11 @@ function main() {
wrap(ext)
]
};
return rollup(options).then(bundle => bundle.write(options));
return rollup(options).then(bundle => {
options.name = moduleName;
options.file = `${path.join(__dirname, '..', 'build', 'ol.ext', moduleName.toLowerCase())}.js`;
bundle.write(options);
});
}));
}