-
Notifications
You must be signed in to change notification settings - Fork 12k
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
webpack production build doesnt work with angular RC 5 #1644
Comments
I think this is the same issue as angular/angular#10618 You can see a minimum example of the fail/success conditions in this repo: https://github.com/OasisDigital/rc5-declaration-order It is not exactly clear to me whether this is CLI problem or Webpack problem or rc.5 problem. |
@kylecordes Thanks. I didn't see that. Don't know if anything actually works yet though as I'm on to the next issue. Lots of fun. I'm starting to think I should stay on systemJS and angular RC4 and wait for all this to blow over (around RC 10 maybe?) |
I had the same issue. After adding |
Same problem here. I removed the moduleId entries and it works when I build without --prod. However, when I use the --prod flag, I start getting the "Unhandled Promise rejection: Template parse errors: Can't bind to ...." errors. However, when I restore the moduleId entries, it still doesn't work. Instead I get the "t.match" exception. So basically, I cannot do a prod build. |
I had this issue as well. I actually think it's related to Webpack, UglifyJS, and the mangle option. I had to get production running quickly, so I updated webpack-build-production.ts with this
Adding keep_fnames fixed the issue for me. This was only happening for me with nested components. I'm going to put together a quick test environment with a nested component to see if I can narrow down the issue and also to test the ordering solution above. |
This worked for me! |
…es: true } to fix production builds issue - see angular#1644 This fixes issue [https://github.com/angular/angular-cli/issues/1644](https://github.com/angular/angular-cli/issues/1644)
This fixes the issue angular#1644 Changed mangle configution passed to UglifyJsPlugin to `mangle: { screw_ie8 : true, keep_fnames: true }`
I just submited a pull request. |
I hope this merged added soon. Right now I have to work with 'ng build' without prod and it is annoying. |
mangle: { screw_ie8 : true, keep_fnames: true } in webpack.prod.js angular/angular-cli#1644
@filipesilva The |
Ah, it's because Angular has changed so that it doesn't use the function names anymore. Unfortunately, my app uses them so it still breaks without |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Windows 10
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:angular-cli: 1.0.0-beta.11-webpack.2
node: 6.3.1
os: win32 x64
do on your code? etc.
Yes. App was created using CLI. Lots of components and usage of a 3rd party library
more information.
Not finding component included in the app module declarations (only one giant app module including everything for now). In example below app-navbar is selector for a component include in app module directive yet I get the following error.
and in app.module I have
and in NavbarComponent
Works fine when not given -prod flag. Worked fine with -prod with systemJS. Not 100% certain if ever used -prod with webpack and angular RC4 but likely did with no errors.
The text was updated successfully, but these errors were encountered: