Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Building-rollup] use per output plugins #980

Closed
LarsDenBakker opened this issue Nov 12, 2019 · 9 comments
Closed

[Building-rollup] use per output plugins #980

LarsDenBakker opened this issue Nov 12, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@LarsDenBakker
Copy link
Member

We should use rollup/rollup#3218 when its merged

@LarsDenBakker LarsDenBakker changed the title [Building-rollup] use per output plugin [Building-rollup] use per output plugins Nov 12, 2019
@abdonrd
Copy link
Collaborator

abdonrd commented Nov 12, 2019

@bennypowers
Copy link
Member

What's the plan for this?

@LarsDenBakker
Copy link
Member Author

LarsDenBakker commented Nov 12, 2019

Someone needs to dig in and analyze whether this feature can be useful for us.

My hope is that we can use the regular plugins entry for shared plugins, and then a per-output plugins for plugins that should run for the different output. That should make it a ton easier to extend the compatibility configuration for our users.

This is probably a breaking change, so we should also check whether there are any other pending breaking changes. I might have some soonish, I need to check And maybe @thepassle has some related to the new service worker stuff.

@thepassle
Copy link
Member

I dont have any breaking changes planned wrt workbox. It would just be a shared plugin (for both outputs), so I think it can stay where it is

@bennypowers
Copy link
Member

We discussed this on slack. One use case for use would be something like

export default {
  output: [
    { dir: 'dist/modern': plugins: [babel({ presets: ['@babel/preset-modules'] })] },
    { dir: 'dist/legacy': plugins: [babel({ presets: ['@babel/preset-env'] })] },
  ]
  // ...
}

@LarsDenBakker
Copy link
Member Author

We will need this to be merged rollup/rollup-plugin-babel#333

@LarsDenBakker LarsDenBakker added the enhancement New feature or request label Nov 21, 2019
@abdonrd
Copy link
Collaborator

abdonrd commented Jan 29, 2020

We will need this to be merged rollup/rollup-plugin-babel#333

Merged! 😁

@LarsDenBakker
Copy link
Member Author

They didn't release it yet though :/

@LarsDenBakker
Copy link
Member Author

This was implemented in v1 of building-rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants