generator-jhipster: styling errors on Tomcat after upgrade to 5.4.2 when packaging for prod
updated it after bellow investigation:
Overview of the issue
After doing an upgrade from 5.3.1 to 5.4.2 all seemed to work fine when working from my developer machine, but after doing a package and deploy to tomcat the fonts are wrong and i noticed that the main.[hash].css is empty and in a different location. there were also strange chars comming from javascript files like nbsp; had an A in front and euro sign was strange.
firefox can not find the man.*.css file which is empty
Besides moving from 5.3.1 to 5.4.2 i also switched from yarn to npm.
i have found end of pipeline solutions to my problems but did not find root cause.
- the fonts were back when i added !important, this suggests the order is different than before i did the upgrade
- i needed to add charset=“UTF-8” to the script import tags in the index.html files. i do not know why this is needed now and not in the previous version. Adding this by hand is not good is there a way to add this automatically or make it not needed any more?
JHipster Version(s)
5.4.2
JHipster configuration
jhipster info Using JHipster version installed locally in current project’s node_modules Executing jhipster:info Options: Welcome to the JHipster Information Sub-Generator
JHipster Version(s)
stand-bystand@0.0.0 /home/tibi/git/standBystand
└── (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
Environment and Tools
openjdk version “1.8.0_181” OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
git version 2.17.1
node: v8.11.3
npm: 6.2.0
yeoman: 2.0.5
yarn: 1.9.4
.yo-rc.json:
{ “generator-jhipster”: { “promptValues”: { “packageName”: “nl.tibi.sbys”, “nativeLanguage”: “en” }, “jhipsterVersion”: “5.4.2”, “baseName”: “standBystand”, “packageName”: “nl.tibi.sbys”, “packageFolder”: “nl/tibi/sbys”, “serverPort”: “8080”, “authenticationType”: “session”, “cacheProvider”: “ehcache”, “enableHibernateCache”: true, “websocket”: false, “databaseType”: “sql”, “devDatabaseType”: “mysql”, “prodDatabaseType”: “mysql”, “searchEngine”: false, “messageBroker”: false, “serviceDiscoveryType”: false, “buildTool”: “maven”, “enableSocialSignIn”: true, “enableSwaggerCodegen”: false, “rememberMeKey”: “xxxxxxxxxx”, “clientFramework”: “angularX”, “useSass”: false, “clientPackageManager”: “npm”, “applicationType”: “monolith”, “testFrameworks”: [], “jhiPrefix”: “jhi”, “enableTranslation”: true, “nativeLanguage”: “en”, “languages”: [ “en”, “nl”, “de” ] } }
Browsers and Operating System
ubuntu 18.04
- Checking this box is mandatory (this is just to show you read everything)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 82 (79 by maintainers)
tibi@tibi:~/git/tmpJhipsterTest$ git checkout fix/jib-www fatal: not a git repository (or any of the parent directories): .git
you have two options revert to this: webpack.prod.js
or open the generated code and change in the index.html the js imports like this: add this: ** charset=“UTF-8” **
Thanks @tibistibi ! Let’s wait to have some feedback, in particular from @danielpetisme , and if that’s OK let’s switch back. This has been working for years, without a good reason I don’t think we should change this.
I just tested and I totally have this issue - in fact it’s even worse, it can’t load my front-end as there is a script error caused by a broken character.
I’m pinging @danielpetisme as he did that change, and I don’t understand why:
-> anybody knows a good reason for this change? Otherwise let’s switch back to target/www
I would suggest using a tool like SmartSynchronize to compare your upgraded project with a new one. It’ll show you which files are different.