Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This would make it much easier to register a scale. You only need to pass the scale and can pass multiple at once if you want I'm not sure I prefer this route, but thought it would be helpful for visualizing the differences between the approaches
@kurkle had suggested over Slack that as an alternative to #6979 to support tree shaking we create a separate entry point for npm such as
index.es6.js
and don't do the auto-registration.Option 1
We might be able to use this register controllers as well, which would also be needed for tree shaking. I'm imagining you'd want to do something like:
Option 2
If you have auto-registration you wouldn't want to have an entry point that imports everything, so you'd want to import the modules, but wouldn't need to register, so it'd end up looking like:
Option 3
Another option would be to remove the registration and pass the constructor type directly in the opions: