-
Notifications
You must be signed in to change notification settings - Fork 14
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
discussion: plugin options revamp #21
Comments
I think these changes make a lot of sense, being able to customize options and plugins per target would be very beneficial. |
I have submitted a proposal to integrate your plugin to Storybook: storybookjs/storybook#5531 This could be a good chance to discuss use cases of the Storybook core, relevant code is here: |
Will you have time to implement (some) of this customization? I can work on implementing this if we settle on an API. |
@LarsDenBakker Sorry, I've been busy with some other projects, and I'm not sure when I'd be able to get to this one myself. I can write up a feature issue with AC if you'd like to take a swing at implementing. |
@LarsDenBakker sorry for the long delay! I'm starting to look at getting some of these changes done. Are there still things you'd like to discuss? |
We switched to recommending rollup, where it is a lot easier to implement these kinds.of things. |
Interesting! Thanks for getting back to me! |
The flurry of activity on this project over the last couple weeks has made me realize that the current options structure isn't terribly forgiving with regards to providing the kind of flexibility that is required in customizing options for Babel. As part of the
3.0.0
release, I'd like to change the format of the options to make this a little more straightforward and manageable. Here are the goals for this change:babel-loader
and presetsObject.assign
)Fortunately, I don't think this requires a huge number of breaking changes. Here are my proposed changes:
options.babel.loaderOptions
will be added to provide shared/globalbabel-loader
optionsplugins
andcacheDirectory
will be removed from theoptions.babel
object in favor of using the corresponding properties inoptions.babel.loaderOptions
options.babel.presetOptions
will remain as a shortcut to customize@babel/preset-env
, and themodules
key will continue to be forced tofalse
options.targets[key].babel
will be added to providebabel-loader
options on a per-target basisoptions.targets[key].browsers
will remain as a shortcut to customizing the@babel/preset-env
'stargets.browsers
option@babel/preset-env
at the global level will be merged with those set in thepresets
array at the target level, regardless of the order of the respectivepresets
arrays.v2.1.0
, and console warnings will be added to notify users on usage@rangermeier, @platosha, @daKmoR, @web-padawan, @adamdoyle, @LarsDenBakker - I'd love to hear your input on this.
The text was updated successfully, but these errors were encountered: