-
Notifications
You must be signed in to change notification settings - Fork 12k
ngDevMode is not defined - regression since 15.2 #25830
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
Comments
Hi @vzakharov-rxnt, Custom webpack configurations are not supported by the Angular team. If the problem persists using the Angular CLI directly. please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. You can use |
@alan-agius4 Are you saying it's possible to build a hybrid app without custom webpack config? Here is how our prod app config looks:
|
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. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
After upgrading from prior 15.2 to 15.2 or later (including latest 16.x), I am getting
ngDevMode is not defined
error on app load. The error is terminating, app does not load.I am using custom webpack plugin and esbuild-loader to build my app.
I reproduced the issue using standard Angular boilerplate project here:
To prove that it works fine in 15.1, I created a branch where the issue is fixed, and opened a PR to merge. Only package.json was changed, downgrading Angular to 15.1. PR triggers CI build, so you can confirm that the issue is indeed fixed:
Please provide a link to a minimal reproduction of the bug
https://ng-esbuild-minify.netlify.app/
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
In a real production app, our custom webpack configuration file is more complex and required to make a hybrid AngularJS/Angular 16 app work.
We are using
EsbuildPlugin
to speed up prod build time by a factor of 2-3x, which is significant when it comes to CI/CD.The text was updated successfully, but these errors were encountered: