fix: fix infinite loop causing startup failure in Windows environment (#335)

This commit is contained in:
tecvan 2025-07-30 17:51:01 +08:00 committed by GitHub
parent ab82507fd2
commit ce521dae8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -13,10 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import path from 'path'; import path from 'path';
import glob from 'fast-glob';
import { import {
lookupSubPackages, lookupSubPackages,
getPackageLocation, getPackageLocation,
@ -44,8 +43,7 @@ export const getTailwindContents = (projectRoot: string) => {
contents.push( contents.push(
...packageLocations ...packageLocations
.filter(r => !!r) .filter(r => !!r)
.map(location => path.resolve(location, 'src/**/*.{ts,tsx}')) .map(location => path.resolve(location, 'src/**/*.{ts,tsx}')),
.filter(pattern => glob.sync(pattern).length > 0),
); );
// 兼容 coze-design 内部 tailwind 样式 // 兼容 coze-design 内部 tailwind 样式