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

Support es6/es2015 TypeScript target #5

Closed
AbakumovAlexandr opened this issue Oct 29, 2018 · 8 comments
Closed

Support es6/es2015 TypeScript target #5

AbakumovAlexandr opened this issue Oct 29, 2018 · 8 comments

Comments

@AbakumovAlexandr
Copy link

This is the same suggestion for breeze-client: 2.0.0-alpha.8 as I've reported here.

I'm using "breeze-client + breeze-bridge2-angular in an Angular 6 app. When TypeScript compiler target is es5 everything works fine. When I set it to es6 / es2015 as described in Angular docs, I'm getting an exception at run-time:

breeze-client.js:1957 Uncaught TypeError: Cannot set property '_$fnName' of undefined
at BreezeConfig.registerFunction (breeze-client.js:1957)
at breeze-client.js:3096
at Object.objectForEach (breeze-client.js:159)
at Module../node_modules/breeze-client/breeze-client.js (breeze-client.js:3088)

I suppose this is because Breeze doesn't support es6 / es2015 target yet.

@graphicsxp
Copy link

graphicsxp commented Jun 4, 2019

I'm experiencing the same issue. Now Angular 8 defaults to es6 / es2015 and this raises the aforementioned exception.

I see thet breeze-client still targets es5. Could this be upgraded ?

@AbakumovAlexandr, did you solve the problem ?

@AbakumovAlexandr
Copy link
Author

@graphicsxp If I recall it correctly, I've firstly figured out the root cause of this error by debugging Breeze code in a browser's JS debugger, then the soltution was to add some polyfill from corejs.

But shortly after dealing with this, fortunately our CEO finally came up with a conclusion that for our app a classic architecture (Angular 2 front-end + pure ASP.NET WebAPI + EntityFramework REST sevice) is good enough than writing SQL queries on the front-end side.

Just as a personal opinion, after raising a bunch of issues on Guthub and SO which are still not only unresolved, but even not answered, I'd not expect any resolution for this in the near future.

The Breeze team representative told me that they're working on rewriting everything in TS, but that project was in beta and not ready for production. If that's still the case, I'm afraid this is bad news for us.

@graphicsxp
Copy link

Thanks for your reply !

My experience with breeze has been rather positive. It was ported to Typescript a while ago and I've been using it successfully in a couple of application. Its benefits are tremendous.
I just figured that when the bundle is created, it generates both a es5 and es6 versions of the library. I need to find out how to reference the correct version in my code because I believe I'm pointing to the wrong one (es5 while my tsconfig is using es6).

A little more help from the breeze team would be appreciated though, but it looks like they've left the building...

@steveschmitt
Copy link
Member

Sorry about the silence. Like you, we are so busy using Breeze on customer projects that we haven't had time to keep up with the maintenance and documentation.

We are using breeze-client (the TypeScript version) on customer projects now, and will be updating one of them to Angular 8 soon, so expect some movement on this issue finally.

@graphicsxp
Copy link

@steveschmitt Awesome, that's great news ! Keep us updated :)

@steveschmitt
Copy link
Member

Just updated breeze-client to 2.0.0-alpha.9, which supports ES6 and Angular 8. Please npm install breeze-client@next and give it a try.

Please note that breeze-client now uses the Angular Package Format, so the paths to the adapters have changed. Please see the README

@badre429
Copy link

@steveschmitt @wardbell after updating in production mode we got this issue #11

@steveschmitt
Copy link
Member

#11 Fixed in breeze-client@2.0.0-alpha.12

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

No branches or pull requests

4 participants