Skip to content

Commit 61e65c5

Browse files
authored
Merge pull request #1158 from objectstack-ai/copilot/fix-error-in-job-step
2 parents 45e3544 + c9fb32c commit 61e65c5

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- **Fields SSR build** (`@object-ui/fields`): Added `@object-ui/i18n` to Vite `external` in `vite.config.ts` and converted to regex-based externalization pattern (consistent with `@object-ui/components`) to prevent `react-i18next` CJS code from being bundled. Fixes `"dynamic usage of require is not supported"` error during Next.js SSR prerendering of `/docs/components/basic/text`.
1213
- **Console build** (`@object-ui/console`): Added missing `@object-ui/plugin-chatbot` devDependency that caused `TS2307: Cannot find module '@object-ui/plugin-chatbot'` during build.
1314
- **Site SSR build** (`@object-ui/site`): Added `@object-ui/i18n` to `transpilePackages` in `next.config.mjs` to fix "dynamic usage of require is not supported" error when prerendering the tooltip docs page. The i18n package is a transitive dependency of `@object-ui/react` and its `react-i18next` dependency requires transpilation for Turbopack SSR compatibility.
1415

packages/fields/vite.config.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,7 @@ export default defineConfig({
3030
fileName: (format) => `index.${format === 'es' ? 'js' : 'cjs'}`,
3131
},
3232
rollupOptions: {
33-
external: [
34-
'react',
35-
'react-dom',
36-
'react/jsx-runtime',
37-
'@object-ui/components',
38-
'@object-ui/core',
39-
'@object-ui/react',
40-
'@object-ui/types',
41-
'lucide-react',
42-
],
33+
external: (id) => /^(react|react-dom|@object-ui\/(components|core|i18n|react|types)|lucide-react)(\/|$)/.test(id),
4334
output: {
4435
globals: {
4536
react: 'React',

0 commit comments

Comments
 (0)