1

Part of code Angular JS:

styles: [
    ["[_nghost-%COMP%]{display:block;background:#fff;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.header[_ngcontent-%COMP%]{background:linear-gradient(90deg,#0061af 43%,#44ade2);color:#fff;padding:1rem 1.8rem}.message[_ngcontent-%COMP%]{padding:1rem 1.8rem}.button-ok-container[_ngcontent-%COMP%]{padding:0 1.8rem 1rem;text-align:right}.button-ok[_ngcontent-%COMP%]{background:#fff;border:none;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);vertical-align:baseline;text-align:center;margin:0;min-width:188px;line-height:36px;padding:0 16px;border-radius:2px;color:#0096d7}.icon-close[_ngcontent-%COMP%]:before{font-size:1.5em;color:#fff;cursor:pointer}"]
]

Styles is 25% of all javascript file.

Is it possible export ALL CSS to separate file and don't load styles from JS?

I need a good argument for my developers - that is possible and not very hard. Thanks.

Andrew
  • 17
  • 3
  • Does this answer your question? [Is it possible to build separate CSS file with angular-cli?](https://stackoverflow.com/questions/42370854/is-it-possible-to-build-separate-css-file-with-angular-cli) – frido Jan 10 '20 at 11:54
  • Hi. Thank you. But no. I need best argument for my developers. – Andrew Jan 14 '20 at 07:57
  • Are you using AngularJS or Angular? What do you mean by `I need an angument for my developers`? – frido Jan 14 '20 at 09:41
  • I think Angular, so as code start with: try { window["webpackJsonp"] = undefined; } catch (ex) {} ... I am a client and order optimization js-scripts. They say that css not possible extract and load separately. Thanks for you consultation. – Andrew Jan 14 '20 at 11:17
  • What's the name of the JS file? – frido Jan 14 '20 at 11:42
  • standard names user-login-widget.js , search-widget.js : try { window["webpackJsonp"] = undefined; } catch (ex) { console.warn(ex); } try { !function(e){function r(r){for(var n,i,a=r[0],c=r[1],l=r[2],p=0,s=[];p – Andrew Jan 14 '20 at 13:05

0 Answers0