I have a single .js file containing multiple exports. It looks like this:
// some-functions.js
export function plusOne(value){
return value + 1
}
export function minusOne(value){
return value - 1
}
Then in my rollup.config.js I want to import one of these functions (plusOne) and create an iife from it.
// rollup.config.js
export default {
input:'./some-functions.js',
/* Named export goes here? */
output:{
name:'plusone',
file:'./rolled-up-functions/plus-one.js',
format: 'iife'
}
}
Is there a way of doing this in rollup? If so, how?
And if not, can anyone recommend a way of doing this using some other tool?