-
Notifications
You must be signed in to change notification settings - Fork 34
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
prod webpack build resulting in WSOD #955
Comments
seems to be related to the logger changes. This is the new error that I see
Other errors are the transitions
|
This is the type of error we were experiencing before because our Angular code does not have explicit annotations. We solved this by adding |
This is how that is configured in webpack: rules: [
/* In production, Webpack minifies JS files and randomizes variable names.
This causes problems with AngularJS unless you use explicit annotations,
which we don't.
https://docs.angularjs.org/error/$injector/strictdi
(The syntax we use is like the 'bad' example: implicit annotations)
So rather than change every file in our codebase, I'm adding this
babel plugin which basically preprocesses our 'bad' code into 'good' code.
Only needed on production because minification doesn't happen on dev. */
{
test: /\.(js)$/,
include: path.resolve(__dirname, 'www'),
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ["angularjs-annotate"],
},
},
{
test: /\.(js|jsx|ts|tsx)$/,
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'],
},
},
], |
Ah, it's because I added some functions at the end of the But |
Having I think the simplest solution here is either 1) just don't put any Angular code in TypeScript or 2) if you do, use explicit annotations so the plugin doesn't have to fix them |
Because I want to fix this ASAP, I think (2) is the quickest solution right now |
Verified on the NREL OpenPATH app; updating |
Testing was done in the devapp with a prod webpack bundle to confirm that the issue was resolved.
|
on the current staging
aria_and_fall_2023_rewrite
branch,I see this 100% reproducible issue
npm run build-dev-ios
npm run build-prod-ios
The prod webpack build seems to be generating a WSOD
The text was updated successfully, but these errors were encountered: