-
Notifications
You must be signed in to change notification settings - Fork 309
main.css missing when I build with --prod #1114
Comments
Please do not delete our form. You are missing a good amount of required data. How can I recreate this issue? Please upload a sample repository. Thanks, |
styles are missing |
I can confirm this issue as well.
as soon as remove the |
@danbucholtz I can confirm this as well. |
The issue is NOT present with "@ionic/app-scripts": "^2.0.0". |
#1120 is related. |
@vkniazeu I've just checked your statement with 2.0.2 version installed and it still produced the same issue.
|
I'll test your project out and verify. It could be a Windows thing. Though I did test some apps on windows. Hmmm. Thanks, |
I'm also experiencing this on OSX |
|
@lordgreg, |
@squallliu and others, I can recreate the issue in @squallliu's sample project. I noticed that it has the following config setting:
Are you all using this setting as well? If I remove this setting, everything works as expected. Thanks, |
HI Dan, I don't have this setting at all:
|
Can you check your Thanks, |
@danbucholtz, no.
|
That could be part of it, too. Are you doing any custom resolving functionality? That is likely part of the problem I think. Can you modify the and add a Please add the output to this thread. Thanks, |
Yes, I'm resolving using an alias to have a working ENV solution for now while #762 is still being discussed. Here's my
You want me to add the log statement with |
@danbucholtz , sorry I'm confused as to where to find the output you are asking for. |
@vkniazeu, can you check if Thanks, |
@danbucholtz , |
I seem to also be getting this behavior with the new version, but only when I run --prod with -l if that is helpful. I'm also on Windows. |
I'm on OSX. I'm getting this behavior with the new version ( 2.0.2 and ionic-angular 3.5.3 ), but only when I run --prod --release. if that is helpful. |
Reproducible with |
Is there anything unique about your apps? Can you recreate it if you start a new project:
Thanks, |
@danbucholtz, I'm not able to reproduce the issue with I'm going to try to update all other outdated packages one by one to pinpoint the issue. What about those questions you asked earlier about Thank you! |
@KillerCodeMonkey I use the same versions but not works. |
I found the problem .. when you build with --prod in android all classes in main.css have a opacity of 0.4 |
strange... now it gets broken again... do not know what happened. After another production deploy the main.css is created but the list styling is broken. |
I found solution. |
@Behnam-r I removed the $colors variable in the variables.scss, but it does not work yet. |
@Behnam-r I posted a comment before, using the tabs templates just like it is created by the CLI does not work properly, so it seems to be related to something else. @danbucholtz have you been able to reproduce this issue on your end? |
hey guys i just ram into this problem and for me, after upgrading to below configuration, th problem is gone now, NOTE THAT THE ionic-angular VERSION is 3.6.0, that wa what missing for me , I had 3.5.3 Working for me now at, cli packages: ionic/cli-plugin-cordova : 1.6.2 Cordova CLI : 7.0.1 ionic/app-scripts: 2.1.3 Android SDK Tools : 25.2.5 |
It's still there even with the following config. Prod breaks css :/ cli packages:
global packages:
local packages:
System:
|
any updates here. I would like to build a prod build because of the smaller file size and execution performance. But some styles are missing (e.g. lists) |
--prod build also loses css for me |
Same for me. Which version is the last working one? |
I'm currently using the latest one and don't have the issue anymore. |
@lordgreg could you share your exact versions? did you upgraded to the latest CLI? https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md |
I manage to limit the problem to the --optimizejs flag. When running with this flag, some css files are missing. |
Hi @KillerCodeMonkey, @summerchill, this is my command:
and the ionic info:
|
strange - does not work for me. But there are only a view styles missing, like when i use ion-grid in ion-item. the widths are not correctly set. Edit: if i set ion-label explicit to width 100%, everything looks fine *thinking Also styles like: |
@danbucholtz here is my list of context.moduleFiles. For readability i only list the once for ionic-angular.
But when run serve without
If I understood this right, And based on this you are trying to resolve all scss files you will need to import?! But most of the components are just used in the html files without being imported in any script. So trying to resolve the scss files based on the moduleFiles will not work. Thats should be the commit that introduce the issue. |
@DavidWiesner, that is very helpful. Here's a work-around that works for me. My problem is that the style of an I looked at I added the following in a template and now it works. <ion-item *ngIf="false">
<ion-label>Dummy</ion-label>
</ion-item> |
Any updates on this topic? I still can't found a solution. There all ok with ionic cordova build android, all styles work fine. And zero styles when ionic cordova build android --prod --release. ` global packages:
local packages:
System:
|
UPD: Not found what was happen with prod but found a life hack that solve problem with the build size and speed of Android app. Use next command to build app:
|
npm install @ ionic/app-scripts @latest --save-dev worked for me https://github.com/ionic-team/ionic-app-scripts/blob/master/CHANGELOG.md |
I have faced same CSS issue when I build with --prod and --release arguments |
Same issue here. I tried the following solutions without success:
Strangely enough, if I don't run with the ionic info:
package.json
|
Is this still an issue with Thanks, |
I was not able to reproduce it anymore @danbucholtz, so seems to be fixed on my end. |
@danbucholtz update ionic-app-scripts 3.0.0 fix the issue in my case |
@danbucholtz yes! it's still happening, you can reproduce it with ionic-conference-app |
Any update on this issue? |
@Heckthor yes! It's fixed in the final version 😃 |
Note: for support questions, please use one of these channels:
https://forum.ionicframework.com/
http://ionicworldwide.herokuapp.com/
Short description of the problem:
main.css missing when I build with --prod and "ionic_manual_treeshaking" set false
What behavior are you expecting?
the size of main.css is 42K
Which @ionic/app-scripts version are you using?
2.0.2
The text was updated successfully, but these errors were encountered: