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

Application breaks on IE11 with Ember.js 3.6 #17497

Closed
YoranBrondsema opened this issue Jan 22, 2019 · 6 comments
Closed

Application breaks on IE11 with Ember.js 3.6 #17497

YoranBrondsema opened this issue Jan 22, 2019 · 6 comments

Comments

@YoranBrondsema
Copy link
Contributor

Yesterday we upgraded our app to Ember.js 3.6 but noticed that that broke it on IE11. We've had IE11 set as a target in config/targets.js this whole time.

It breaks on the first define in app.js, i.e. the bundle containing all the application-specific Javascript. The error is:

'define' is undefined

I see that PRs #17188 and #17246 might have something to do with it. I checked the value of needsLegacyBuild from https://github.com/emberjs/ember.js/blob/v3.6.1/lib/index.js#L84 during the build and it's set to true, as you would expect. So I'm not too sure about where the bug is.

@rwjblue
Copy link
Member

rwjblue commented Jan 22, 2019

Hmm, define is undefined seems like it would not be the first error, can you share any other errors triggered before that one? A minimal reproduction would also be very helpful...

@YoranBrondsema
Copy link
Contributor Author

That's the first error I saw, I think. I reverted back to 3.5 now so can't check right away, but I'll work on a reproduction app tomorrow and get back to you.

@rwjblue
Copy link
Member

rwjblue commented Jan 22, 2019

Awesome, thank you!

@YoranBrondsema
Copy link
Contributor Author

YoranBrondsema commented Jan 23, 2019

OK I figured it out. In the end it was my own fault, because I was importing the template compiler with

app.import('node_modules/ember-source/dist/ember-template-compiler.js');

instead of

app.import('vendor/ember/ember-template-compiler.js');

How come it didn't do the transpilation when importing directly from node_modules? I'm not too familiar with the internals.

Also, I figured it out through a StackOverflow answer. Since the template compiler is part of the core, maybe this is something that belongs in the guide? For instance on https://guides.emberjs.com/release/addons-and-dependencies/managing-dependencies/? I would be happy to open up a PR to document the proper way to import the template compiler somewhere in the docs.

@rwjblue
Copy link
Member

rwjblue commented Jan 23, 2019

Nothing is transpiled in node_modules, but the contents of vendor tree is either the "legacy" (IE11 compat node) or the "not ancient browser" build.

See #17402 for a similar issue and its fix in #17403.

@YoranBrondsema
Copy link
Contributor Author

OK I see, thanks!

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

No branches or pull requests

2 participants