⊗tlWpCsCBT 32 of 55 menu

Testing CSS Bundle Assembly in Webpack

Let's test assembling CSS into a separate bundle. Let's say we have two CSS files.

First:

body { background: red; }

Second:

p { color: green; }

We import them to the entry point:

import './styles1.css'; import './styles2.css';

The project build command will collect everything into a separate file named main.css:

body { background: red; } p { color: green; }

Import three CSS files to your entry point.

Build in development mode. Inspect the bundle's CSS file.

Build in production mode. Inspect the bundle's CSS file.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline