-
Notifications
You must be signed in to change notification settings - Fork 12k
Global styles missing from Windows Server build #4094
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
What version of the CLI are you using on the build server? The behavior changed recently regarding the global styles bundle. Development builds (the default) will produce a javascript bundle instead of a css bundle. This can be changed by using the |
On the build server the cli version is 1.0.0-beta-21. Would it be worth upgrading? |
Tried updating and am encountering this issue - #4072 Reverted to beta-21 and still had the styles issue. It just doesn't seem to be including whatever is specified in the global styles config |
The CSS extract (creating a new .css file) options wasn't available in Regarding #4072, fully follow https://github.com/angular/angular-cli#updating-angular-cli while upgrading and it should not happen. |
hi @filipesilva. Using the css extract flag was just a suggested solution and I immediately ran into the issue I linked. The issue still occurs with the production build not including the global styles on the build machine with the exact same set up as dev machines. I can see the global styles file being picked up in build logs but they never seem to be included or applied by the browser. I've followed the upgrading steps and it still isn't happening. Whether it is a production build or not, it should still pick up the global styles. Can you offer any suggestions as to what to look into? |
@patrickoneill46 it really depends on the version you're using. It might have been a bug on the version you are using that was fixed in subsequent versions. I know it sucks to hear but in betas we can't promise support for anything but the latest one. The best I can say is that on the latest versions, doing a production build does include the Regardless of whether you have the |
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. |
OS?
Versions.
Repro steps.
Generated an app on my windows machine and my mac and when I run 'ng build' the global styles is generated and a link tag is added to the generated index.html.
However I am trying to generate a build on a windows server
The only significant changes to the config are -
Adding to angular-cli.json
"styles": [
"assets/styles.scss"
]
...
"styleExt": scss
The log given by the failure.
At the end of 'ng build' log output I see
'Process exited with code 0'
Mention any other details that might be useful.
In the logs from the build step, on both a Windows desktop machine and a Mac I see
chunk {0} main.f39f2b70462cbf4a98b0.bundle.js, main.f39f2b70462cbf4a98b0.bundle.map (main) 3.6 MB {1} [initial] [rendered]
chunk {1} styles.b2328beb0372c051d06d.bundle.js, styles.d41d8cd98f00b204e9800998ecf8427e.bundle.css, styles.b2328beb0372c051d06d.bundle.map, styles.b2328beb0372c051d06d.bundle.map (styles) 69 bytes {2} [initial] [rendered]
chunk {2} inline.d41d8cd98f00b204e980.bundle.js, inline.d41d8cd98f00b204e980.bundle.map (inline) 0 bytes [entry] [rendered]
On the build machine I see
chunk {0} main.13b4d333803f1cf29d7d.bundle.js, main.13b4d333803f1cf29d7d.bundle.map (main) 3.61 MB {1} [initial] [rendered]
chunk {1} styles.9851af0d1672bddf0116.bundle.js, styles.9851af0d1672bddf0116.bundle.map (styles) 3.39 kB {2} [initial] [rendered] not the styles[build-hash].bundle.csss is missing
chunk {2} inline.d41d8cd98f00b204e980.bundle.js, inline.d41d8cd98f00b204e980.bundle.map (inline) 0 bytes [entry] [rendered]
And the generated index.html is missing the style tag
All the other config is the default generated config
The text was updated successfully, but these errors were encountered: