Skip to content

Temporary workaround for static injector error #636

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

Closed
wants to merge 3 commits into from

Conversation

RZeni
Copy link
Contributor

@RZeni RZeni commented Jun 3, 2018

The Static Injector Error that is being experienced in production builds (#633) seems to be caused by the uglify-webpack-plugin or the underlying uglify-es. The temporary workaround is to set mangle to false. This will of course have the unfortunate side effect of increasing bundle size and no mangle. Although, it may be the best we can do until a patch is released.

This error can be commonly caused by a provider being used but not included in the module, this leads me to believe the provider name is de-synced during the mangle process.

Fully removing uglify did not workaround this issue either. Webpack 4 uses the same plugin internally when in production mode with the default for mangle set to true.

@RZeni
Copy link
Contributor Author

RZeni commented Jun 4, 2018

Closing b/c a better workaround was suggested (preserve class names) until provider name resolution is fixed.

@RZeni RZeni closed this Jun 4, 2018
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

Successfully merging this pull request may close these issues.

1 participant