Repository navigation
generate package in presetPluginConfigs (fixes #1365) - #1411
Conversation
|
Deploy preview ready! Built with commit 2d7f3a0 |
|
This is close. You don't need to set config.package at all. Instead, modify the code that uses it to instead use config.label. |
|
@Daniel15 another question - was the intention to remove all right now, I have it replUtils to still check the |
|
@Daniel15 - just wanted to bring this back up and see what your thoughts are on this. thanks :) |
|
Sorry for the delay, I've been super busy recently. This looks good to me. @bvaughn what do you think? |
|
I dunno. This looks like a clean-up task you filed, @Daniel15 ? 😄 That being said, if we are just assuming the plugin is "babel-preset-" + label, then I would expect to see us concatenating those strings somewhere here rather than just doing Also I think this change will break the serialized/local-storage settings for the REPL since it would cause a mismatch. |
|
I think the hardcoding is fine, and actually I guess this would break when we use scoped packages like |
|
I guess I didn't see the original code as problematic so I'm not sure what the motivation is. 😄 |
|
I don't have a strong take on this. If this isn't the right fix, I can close. Was just trying to get a feel for the repo through working on an issue 😄 |
To remove duplication :) I tested it and old URLs still seem to work fine, so let's do it. |
At the cost of added complexity. That isn't an obvious win to me. 😄 Edit This isn't to say that it's a bad change, I just thought the code was fine before too. The amount of duplication was trivial. |
|
^ this won't be the same next release since we moved to scoped like I since earlier babel/babel#6495 😄 |
|
@hzoo - The plugins are all in babel-standalone, so changing the package name likely won't affect anything. We don't actually use the npm package name anywhere in the REPL.
I don't think we actually care about the package name in the REPL at the moment, so IMO it's not worth caring about it in the REPL code at this point in time. Maybe in the future we should add it again if we need it :) |
The issue presented in #1365 asks to delete the package key from
presetPluginConfigs@Daniel15
I'm not sure if that was the exact task to be done or if there is something more here. Checking
js/repl/ReplOptions.js, it looks like the presetPluginConfig needs the package key in order for http://babeljs.io/repl/# page to handle its state.Currently I just deleted the hardcoded package key and generated after the object is created, so that the
packagekey is still used inReplOptions.jsHappy to help on the issue in any way I can :)