-
Notifications
You must be signed in to change notification settings - Fork 41
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
Can I use this for Production? Or when will this be ready for PROD? #75
Comments
Hi @batchu good question. Well since Angular is already released its probable that they stop making breaking changes. The syntaxis could probably change a little bit when future features come but I'll try my best to keep the old way working, worst case scenario is you'd have to point to a specific version of the library in your package.json but I dont believe this would happen soon if it does. So I'd think its production ready now. Angular 2 is still too new so I'll give it a couple more weeks to see if anything arises then I'll remove the warning. |
Hi @langley-agm, a related question here. |
Usually this is one of the aspects where DI starts to shine. This is mostly about project preferences, I usually leave it as info for both, and use the console to change it only when I need something more specific, then change it back to info after I'm done. |
@langley-agm,
Doing
I'm trying to use the same config variable to affect the LOGGER level, but whether I introduce Again, I know this doesn't quite relate to your module. I figured I'd just ask if you ran into a similar setup. Thanks! |
So the regular configuration in your app should be something like this:
What happens if you create a constant in an environment specific file and use that one instead? environment.ts (the default)
environment.production.ts (prod specific)
app.module.ts
|
@langley-agm Thank you very much for all the time and help! |
@stepanic |
@langley-agm this is okay, also without |
@langley-agm this is application, you could add first, execute |
|
@stepanic I've the same problem using angular2-logger in an application based on the last stable versions of angular and angular-cli: I tried to replace the angular2-logger dependencies including directly the 3 source files (level.ts, logger.ts and providers.ts) in my project and updating the imports: now I'm able do run the application in prod mode using Maybe the problem is from how the library is compiled to be published in npm? |
There's no correct way to compile a library, different frameworks require different ways. That's why the dist includes different compiles so you use the one you need. Even Angular 2 has been changing this several times. The problem is in how its getting loaded. If you notice in Angular AOT's guide they have to make an specific configuration just for the rxjs library: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html must likely its a similar issue. I am working to find a way for people to not to have to go through this extra step for AoT, hopefully that'll help cli as well. |
Hi @langley-agm , I am also getting the following error in production build: Is there a fix for this? Thanks, |
Hello @harikrishnan-u01 , That's an error of the minified code, I can't possibly guess what that t means. You have to add map files next to the min files in order for it to show you what's the exact error in the unminified code. |
Hi @stepanic , Did you find a fix for this issue? Or is there any alternate solution I can use? Thanks, |
Hi @pankajsri03 , There was no resolution for this issue. So I ended up implementing my own logger framework. But you can try using https://github.com/dbfannin/ngx-logger which was working fine in production build. There was an issue with IE11 because of which I didnt use this library. But this seem to be fixed in the latest release. Hope this helps. Thanks, |
@ToGoBananas yea, no work has been done yet towards cli support, PRs are welcome =) |
Based the Readme.md this is not for production.
Can I use this for Production somehow? Or when will this be ready for PROD?
The text was updated successfully, but these errors were encountered: