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 component-manager and modifier-manager to default module unification configuration #301

Merged
merged 3 commits into from Dec 24, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions mu-trees/addon/ember-config.js
Expand Up @@ -18,12 +18,14 @@ export default function generateConfig(name) {
controller: { definitiveCollection: 'routes' },
component: { definitiveCollection: 'components' },
'component-lookup': { definitiveCollection: 'main' },
'component-manager': { definitiveCollection: 'main' },
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I don't think main is right? Shouldn't it be component-managers (assuming src/component-managers/* is where they go)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense yeah. I haven't tested that myself yet though. In https://emberclear.io I've been using main with sparkles.
I can do some testing tomorrow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so if I just add

  'component-manager': { definitiveCollection: 'component-managers' },

I get this error with sparkles:

vendor.js:96748 Uncaught TypeError: Cannot read property 'defaultType' of undefined
    at RequireJSRegistry._checkDefaultType (vendor.js:96748)
    at RequireJSRegistry._detectModule (vendor.js:96737)
    at RequireJSRegistry.has (vendor.js:96757)
    at Resolver._serializeAndVerify (vendor.js:66164)
    at Resolver.identify (vendor.js:66132)
    at Resolver.resolve (vendor.js:66152)
    at Class.resolve (vendor.js:97505)

the resolver still doesn't
find the component-manager, so... I needed to add to collections.

Copy link
Member

Choose a reason for hiding this comment

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

You'd also need to update the defaultType

event_dispatcher: { definitiveCollection: 'main' },
helper: { definitiveCollection: 'components' },
initializer: { definitiveCollection: 'initializers' },
'instance-initializers': { definitiveCollection: 'instance-initializer' },
location: { definitiveCollection: 'main' },
model: { definitiveCollection: 'models' },
'modifier-manager': { definitiveCollection: 'main' },
partial: { definitiveCollection: 'partials' },
renderer: { definitiveCollection: 'main' },
route: { definitiveCollection: 'routes' },
Expand Down