2

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?

1
  • Did you ever find out how to do this? Commented Jul 3 at 18:17

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.