-
Notifications
You must be signed in to change notification settings - Fork 266
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
Syntax error in IE with AppSync in Angular 7 #310
Comments
Forgot to include the dependencies from my Angular project. Here they are:
|
I'm also facing the same problem, this is due to the dependency of the debug package which was likely added from 1.5.0 However, I'm still looking for a workaround such as babeling the dist package or any way that angular-cli can provide. Or if a maintainer of this library can review if the debug package is required. |
Same problem here, unfortunately i need to support IE 11 in an app i'm developing. |
Same issue here. |
After further investigation, Another solution is sticking to aws-appsync@1.4.0 The final solution is a little bit cumbersome (for angular). Add three packages to your package.json and npm install
Then create a webpack.extra.js in the project root (same folder as the package.json)
Finally, edit the scripts from your package.json.
|
Thanks, It's working after upgrading to 1.7.0 now |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
App does not transpile properly for IE in angular 7.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
App works in IE properly when built with angular 6. After upgrade to angular 7 app does not run in IE, showing syntax errors in console. The issue applies only to IE. It works fine in Chrome and Firefox.
App
works properly
in IE when built with angular 7without AppSync
. It includes aws-amplify and aws-amplify-angular which work properly.One symptom occurs when running the development server using
ng serve
. IE throws syntax error in the console on this code:Note the arrow function expression, which is not supported in IE.
A different symptom occurs when running the development server against compiled code using
http-server dist/app/
. IE throws 'Expected identifier' error in console on this code:Note the spread syntax, which is not supported in IE.
What is the expected behavior?
The code should be properly transpiled for IE automatically by the Angular build process but is not happening for aws-appsync under Angular 7. I found a similar issue reported in a different project, angular/angular-cli#9508, with this description of the underlying cause:
I'm not saying that is the cause here but I wonder if aws-appsync is also shipping with
only ES2015
sources.Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?
Code works properly under angular 6. It fails under angular 7.
App includes polyfills for IE.
index.html includes script required by amplify for angular 6 compatibility
App includes dom.ie.d.ts file for IE typescript compatibility:
App works properly with aws-appsync removed.
Code that instantiates appsync client:
Code that uses client:
The text was updated successfully, but these errors were encountered: