Description
angular-cli: 1.0.0-beta.18 node: 6.2.1 os: darwin x64
I do have a .png
file in assets folder, and I refer in my CSS as background: url(/../../assets/images/Logo_3d.png) no-repeat;
as an inline style.
and my webpack output show no png package chunk, So I guess it would be bundled as part of styles chunk.
Asset Size Chunks Chunk Names inline.js 1.47 kB 3 [emitted] inline 674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted] b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted] fee66e712a8a08eef5805a46892932ad.woff 98 kB [emitted] af7ae505a9eed503f8b8e6982036873e.woff2 77.2 kB [emitted] main.0b7da689dc574a32e9bf.bundle.js 2.91 MB 0, 3 [emitted] main styles.773d32919e284cc33328.bundle.js 284 kB 1, 3 [emitted] styles scripts.85878e10a4d6158213d7.bundle.js 10.2 kB 2, 3 [emitted] scripts 912ec66d7572ff821749319396470bde.svg 444 kB [emitted] main.0b7da689dc574a32e9bf.bundle.map 18.7 MB 0, 3 [emitted] main styles.773d32919e284cc33328.bundle.map 622 kB 1, 3 [emitted] styles scripts.85878e10a4d6158213d7.bundle.map 23.3 kB 2, 3 [emitted] scripts inline.d41d8cd98f00b204e980.bundle.map 13.5 kB 3 [emitted] inline styles.773d32919e284cc33328.bundle.js.gz 40.5 kB [emitted] main.0b7da689dc574a32e9bf.bundle.js.gz 663 kB [emitted] index.html 615 bytes [emitted]
But when I access my site by running in prod mode. ng serve --prod
I still see the image rendered in original size of 420kb
.
Doesn't the webpack take care of image compression? May be is this Intentional?