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

extend existing EmberENV for ember-inspector #1252

Merged
merged 2 commits into from Sep 6, 2022

Conversation

patricklx
Copy link
Contributor

fixes #1251

@patricklx
Copy link
Contributor Author

if object.assign is not well enough supported for you then this could be used

function(e, t) {
    for (var r in t)
        e[r] = t[r]
    return e
}(window.EmberENV || {}, {...});

@ef4
Copy link
Contributor

ef4 commented Sep 5, 2022

Thanks for working on this, this looks like a good fix.

But yes, we do still support Ember 3.x versions and those support IE11, so let's not add Object.assign here.

You can use object spread (because if the app needs IE11 support their babel settings will transpile this):

window.EmberENV={ ...(window.EmberENV || {)}, ...${JSON.stringify(emberENV, null, 2)} }

@ef4 ef4 merged commit 031fd6c into embroider-build:main Sep 6, 2022
@ef4 ef4 added the bug Something isn't working label Sep 6, 2022
@patricklx patricklx deleted the patch-2 branch September 6, 2022 14:58
@void-mAlex
Copy link
Collaborator

Thanks for working on this, this looks like a good fix.

But yes, we do still support Ember 3.x versions and those support IE11, so let's not add Object.assign here.

You can use object spread (because if the app needs IE11 support their babel settings will transpile this):

window.EmberENV={ ...(window.EmberENV || {)}, ...${JSON.stringify(emberENV, null, 2)} }

@ef4 I have that exact ie11 use case and I can confirm it doesn't get transpiled.
looks to be the single instance in all the chunks/vendor that is not fixed.

not sure if it is a side effect due to staticEmberSource or not

@ef4
Copy link
Contributor

ef4 commented Jul 21, 2023

That's pretty weird, can you check if this exact same code would transpile correctly if you put it into any other spot in your app code?

@ef4
Copy link
Contributor

ef4 commented Jul 21, 2023

Oh, I see, I think this is code that gets directly appended to vendor.js. Yeah, that would skip babel. We should strategize what's the cleanest fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

production build breaks ember-inspector component tab
3 participants