<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Debug on Felix Mao - AI Creator, Frontend Engineer &amp; Indie Hacker</title><link>https://maoxunxing.com/en/tags/debug/</link><description>Recent content in Debug on Felix Mao - AI Creator, Frontend Engineer &amp; Indie Hacker</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 30 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://maoxunxing.com/en/tags/debug/index.xml" rel="self" type="application/rss+xml"/><item><title>"Selector can't has classes from different scopes" — how to fix this csso error</title><link>https://maoxunxing.com/en/csso-selector-scopes-error/</link><pubDate>Wed, 30 Sep 2026 00:00:00 +0000</pubDate><guid>https://maoxunxing.com/en/csso-selector-scopes-error/</guid><description>&lt;p>Your webpack build fails during CSS minification with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>Selector can&lt;span style="color:#f6f8fa;background-color:#82071e">&amp;#39;&lt;/span>t has classes from different scopes
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="what-it-actually-means">What it actually means&lt;/h2>
&lt;p>This error comes from &lt;a href="https://github.com/css/csso">csso&lt;/a>, the CSS minifier. It only happens when your build passes &lt;strong>usage data with &lt;code>scopes&lt;/code>&lt;/strong> to csso — typically through &lt;code>css-minimizer-webpack-plugin&lt;/code> (with the csso minifier) or &lt;code>csso-webpack-plugin&lt;/code>.&lt;/p>
&lt;p>Scopes are csso&amp;rsquo;s way of understanding CSS Modules-style isolation: you tell csso which class names belong to the same &amp;ldquo;scope&amp;rdquo; (i.e. they never appear on the same markup), and csso can then merge rulesets more aggressively. Per the &lt;a href="https://github.com/css/csso#scopes">csso docs&lt;/a>, the exception throws in exactly two cases:&lt;/p></description></item></channel></rss>