- Add next-intl v4.13.2 with cookie-based locale (no i18n routing) - Create src/i18n/request.ts reading NEXT_LOCALE cookie - Merge zh-CN/en messages from teacher-portal + add shell.dev.templates namespace - Wrap next.config.js with withNextIntl plugin (Turbopack resolveAlias) - Refactor RootLayout to async + NextIntlClientProvider + getLocale/getMessages - Replace ThemeI18nProvider with ThemeProvider (theme-only, i18n removed) - Remove locale/setLocale from PluginStore - Rework locale-switcher to useLocale/useTranslations + router.refresh - Update dev/templates page to use getTranslations (Server Component) - Fix WorkbenchPageShell test (loading prop + center instead of children) Verified: locale switch via NEXT_LOCALE cookie changes <html lang> and messages zh-CN: 保存/取消/切换侧栏 | en: Save/Cancel/Toggle sidebar typecheck 0 errors | lint 0 errors 2 warnings (generated) | vitest 231 passed
29 lines
666 B
YAML
29 lines
666 B
YAML
packages:
|
|
- 'services/*'
|
|
- 'apps/*'
|
|
- 'packages/*'
|
|
- 'scripts/*'
|
|
|
|
# pnpm 11+ build scripts 白名单(从 package.json 的 pnpm.onlyBuiltDependencies 迁移)
|
|
allowBuilds:
|
|
'@apollo/protobufjs': false
|
|
'@module-federation/nextjs-mf': true
|
|
'@nestjs/core': true
|
|
'@parcel/watcher': set this to true or false
|
|
'@sentry/cli': true
|
|
'@swc/core': true
|
|
bcrypt: true
|
|
better-sqlite3: true
|
|
cpu-features: true
|
|
esbuild: true
|
|
msw: true
|
|
protobufjs: true
|
|
sharp: false
|
|
ssh2: true
|
|
tsx: true
|
|
|
|
# 强制统一 React 类型版本(避免 18.x 与 19.x 共存导致类型冲突)
|
|
overrides:
|
|
'@types/react': '^19.0.0'
|
|
'@types/react-dom': '^19.0.0'
|