-
Notifications
You must be signed in to change notification settings - Fork 229
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
Angular production build gives problems with autobahn #346
Comments
Unsure if this is the cause of your issue, but spotted a naming mistake:
|
I made a typo indeed, but that is not the case. The problem lies with the autobahn library does not have types, but there is a package @types/autobahn, but I can't seem to figure out how to make it work with the package. |
Fixed it by changing: target: "es5" in tsconfig.json to target: "es2015" |
Changing the target is not a good solution because es2015 is much newer and therefore doesn't have support in as many versions of browsers. We would love to assume that this shouldn't be an issue because people should have up to date browsers, but there's still an inordinate amount of people using Internet Explorer (which isn't supported at all by es2015) and older versions of Chrome, Firefox, etc due to company requirements and/or individual ignorance of browser updates. I'd like to see a real solution to this, but this might require an update to |
Problem
The problem is that when running production mode I get an error but when running dev mode everything works.
Version
ng version:
Steps to reproduce
I create a new project:
I install autobahn (NOT globally installed)
package.json file:
I edit 1 file: src/app/app.component.ts:
I run: ng serve or ng build (and serve with nginx) no errors.
But when I run ng serve --prod or ng build --prod and serve with nginx I get the following error in the browser console:
The text was updated successfully, but these errors were encountered: