Skip to content

Support for multiple bundles specified in a single config #863

@leo

Description

@leo

I'm currently building a pretty big application over at @zeit: While bundling the react application, I'm also bundling/transpiling the electron part.

To accomplish this, I've created a rollup.config.electron.js and a rollup.config.react.js who're both doing different things (but pretty similar). At the same time, I'm using concurrently to run the CLI with -w for both configs at the same time. In my opinion, that's all pretty hacky.

So my wish would be that I could simply combine both configs in one rollup.config.js:

export default [
  {
    entry: 'src/foo.js',
    dest: 'dist/foo.js'
  }, {
    entry: 'src/bar.js',
    dest: 'dist/bar.js'
  }
]

This has already been suggested in #703 and several approaches have been mentioned. However, not a single of them is a long-term solution, if you ask me. This could be much easier!

Because of this reason, @bahmutov created rollem. However, the package isn't as fast as rollup itself would be because it's implementing the whole --watch functionality on its own. In addition, it does not support ES2015 module syntax.

IMHO, we should just build this into the core.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions