-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[BUGFIX release] Only setup babel options once. #4328
[BUGFIX release] Only setup babel options once. #4328
Conversation
We are working around this in ember-cli-fastboot by calling the function in |
I'll still merge once travis passes as a workaround. It feels like something is missing from the addon author perspective though. |
@fivetanley - I don't feel like it is scenario solving. We only need to setup our addon's options once, not once for each time it is included into something else. Every time |
59552c5
to
eaea053
Compare
Yes, moving to |
Looks like the build failed because a call to |
`included` is called for each instance of `EmberApp` created within the consuming applicationm, which means that we would be adding the same plugins if the consuming application happened to be creating two `EmberApp` instances. For example, ember-cli-fastboot currently uses this technique to build both for fastboot AND the normal build. I know of a few other applications that use similar techniques to build two versions of the same `EmberApp` (i.e. a mobile version and a desktop one). This allows us to ensure that `this.options.babel` is only setup once (regardless of how many times `included` is being called) during init.
eaea053
to
545f0a3
Compare
OK, updated again. Should fix the error that we were hitting before. When I moved the setup into |
r+ |
Any thoughts for users on the best workaround for now? I also just ran into this problem. |
Can you tell us more about the situation you are running into this with? Typically it has been fastboot only as far as I can tell. |
Otherwise you can use this addon from master. |
Yes it was fast boot in my case. I'll use master as you suggest. Thanks. On Wednesday, April 13, 2016, Stanley Stuart [email protected]
|
included
is called for each instance ofEmberApp
created within the consuming applicationm, which means that we would be adding the same plugins if the consuming application happened to be creating twoEmberApp
instances.For example, ember-cli-fastboot currently uses this technique to build both for fastboot AND the normal build. I know of a few other applications that use similar techniques to build two versions of the same
EmberApp
(i.e. a mobile version and a desktop one).This allows us to ensure that
this.options.babel
is only setup once (regardless of how many timesincluded
is being called).Fixes #4322.