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
AOT compilation using ngtools/webpack #5907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a minor mistake.
Dont forget to test prod profile in both maven and gradle
// AOT Plugin | ||
new AotPlugin({ | ||
tsConfigPath: './tsconfig-aot.json', | ||
entryModule: root('src/main/webapp/app/app.module#HipzeeAppModule') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardcoded module name!
comments: false, | ||
sourcMap: true, | ||
compress: { | ||
screw_ie8: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😈
@deepu105 prod profile is working |
module name was the mistake i meant |
-%> | ||
import { platformBrowser } from '@angular/platform-browser'; | ||
import { ProdConfig } from './blocks/config/prod.config'; | ||
import { <%=angular2AppName%>AppModuleNgFactory } from '../../../../<%= BUILD_DIR %>aot/src/main/webapp/app/app.module.ngfactory'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be available all the time right?
check failed build |
@@ -56,7 +56,7 @@ for (const idx in fields) { | |||
tsType = 'string'; | |||
} else { //(fieldType === 'byte[]' || fieldType === 'ByteBuffer') && fieldTypeBlobContent == 'any' || (fieldType === 'byte[]' || fieldType === 'ByteBuffer') && fieldTypeBlobContent == 'image' || fieldType == 'LocalDate' | |||
tsType = 'any'; | |||
if ((fieldType === 'byte[]' || fieldType === 'ByteBuffer') && fields[idx].fieldTypeBlobContent == 'image') { | |||
if ((fieldType === 'byte[]' || fieldType === 'ByteBuffer') && fields[idx].fieldTypeBlobContent !== 'text') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, how this was not throwing error so far... 🤔
There is also issue with the TS entity model class which didnt fail earlier its coz of one to many relations declared in singular instead of plural as it appears in DTO or domain |
try this fix
could also convert the for loop on fields on same file to a forEach? |
ok this fix lets it compile but still I get no screens. I see below error @sendilkumarn can you test it on a clean fresh project?
|
} else { | ||
fieldType = tsKeyType; | ||
fieldName = relationships[idx].relationshipFieldName + "Id"; | ||
if (dto == "no") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh dto === 'no'
plz i missed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protractor tests still failing probably same error as above when running in prod profile |
btw also rebase with current master |
@sendilkumarn are you stuck? do you need help? we really need this to proceed with #4794 |
new webpack.optimize.UglifyJsPlugin({ | ||
beautify: false, | ||
comments: false, | ||
sourcMap: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo?
@sendilkumarn @jdubois I had to revert this PR as its causing some sort of infinite loop in ngc phase |
I'll create a new branch and PR to work on this |
Please make sure the below checklist is followed for Pull Requests.
Travis tests are green
Tests are added where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed