Open
Description
Is this a bug report?
Yes
Environment
npx create-react-app --info
prints empty result for some reason.
Steps to Reproduce
Using CRA 3.0.1.
create-react-app style_test
npm i [email protected] --save
- In
index.js
import two CSS files - first, a reset CSS, second, the bootstrap CSS. - Run dev server and production builds and compare results.
Expected Behavior
Both dev server and production builds should display text using bootstrap CSS.
Actual Behavior
Dev server works as expected, but production build contains two CSS chunks, one with bootstrap code and another with reset CSS, loaded in wrong order (bootstrap first). As a result, in production version text is not styled.
Bootstrap (and only bootstrap) appears in 2.*.chunk.css
, while reset CSS and all my sass styles end up in main.*.chunk.css
. What is the benefit of using two chunks, anyway? Just faster load times due to parallel loading of both scripts?