Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The method for figuring out the sequence of CSS in a Create React app that was constructed with Webpack and Customize-CRA involves the following steps:

  1. Open your app in the browser and navigate to the page whose CSS sequence you want to find.

  2. Use your browser's developer tools to inspect the HTML markup of the page.

  3. Look for the link elements in the head section of the HTML markup. These link elements contain the CSS files that have been included in the page.

  4. Note the order in which the link elements appear in the head section. This is the sequence of CSS files that are being loaded by the app.

  5. If your app is using CSS modules, the order in which the CSS files are included may not matter as much, since each module will be scoped to a specific component or page. However, if your app is using global CSS styles, the order may be more important, since later styles may override earlier ones.

  6. To control the order in which CSS files are loaded, you can modify the Webpack configuration of your app. Look for the "style-loader" and "css-loader" modules in the Webpack configuration file, and adjust their "order" or "pre" and "post" parameters as needed.