Skip to content

fix: Fix build issues for release #8613

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ build:
done
node scripts/buildI18n.js
node scripts/generateIconDts.js
node scripts/fixUseClient.js

website:
yarn build:docs --public-url /reactspectrum/$$(git rev-parse HEAD)/docs --dist-dir dist/$$(git rev-parse HEAD)/docs
Expand Down
2 changes: 1 addition & 1 deletion packages/@react-spectrum/s2/src/Fonts.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ReactDOM from 'react-dom';
import {ReactNode, version as ReactVersion, useEffect, useMemo, useRef} from 'react';
import {useLocale} from 'react-aria';
import './fonts.css';
import './font-faces.css';

// Typekit ids for each CJK locale. These use dynamic subsetting, so cannot be loaded as CSS.
// Because of the large size of the JS, we only download the script for the locale that is used.
Expand Down
7 changes: 7 additions & 0 deletions scripts/fixUseClient.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const fs = require('fs');

for (let f of ['packages/@react-spectrum/s2/dist/module.mjs', 'packages/@react-spectrum/s2/dist/main.cjs']) {
let contents = fs.readFileSync(f, 'utf8');
contents = contents.replace(/['"]use client['"];?/g, '');
fs.writeFileSync(f, contents);
}