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

Add/composition auto disable #11364

Merged
merged 3 commits into from
Jul 2, 2020
Merged

Add/composition auto disable #11364

merged 3 commits into from
Jul 2, 2020

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Jun 30, 2020

Issue: -auto refs are always added users might not want that-

What I did

I added some code that would deal with:

module.exports = {
  refs: {
    'my-auto-loaded-ref-id': null,
  },
};

This would remove the ref that was auto-injected

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s use {disabled: true} for consistency with addons and to avoid confusion with accidental falsey values (<- this is something you originally recommended with addons ;))

@ndelangen
Copy link
Member Author

Good call!

@ndelangen ndelangen merged commit 0a64eba into next Jul 2, 2020
@ndelangen ndelangen deleted the add/composition-auto-disable branch July 2, 2020 08:25
@tmeasday
Copy link
Member

tmeasday commented Jul 2, 2020

Uggh sorry this should have been disable: true. Will fix

@@ -70,6 +70,11 @@ async function getManagerWebpackConfig(options, presets) {

if (definedRefs) {
Object.entries(definedRefs).forEach(([key, value]) => {
if (value?.disabled) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	      if (value?.disabled === true) {

oops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants