Skip to content

Commit

Permalink
Merge pull request #595 from VitNode/react-compiler
Browse files Browse the repository at this point in the history
feat(frontend)!: Add react-compiler as default
  • Loading branch information
aXenDeveloper authored Dec 1, 2024
2 parents 5a8bc81 + e042b47 commit 8275b72
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
18 changes: 17 additions & 1 deletion packages/frontend/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,34 @@ const nextConfig = config => {
frontend: new URL(ENVS.frontend_url ?? 'http://localhost:3000'),
};

const transpilePackages = config.transpilePackages || [];
const imageRemotePatterns = config.images?.remotePatterns || [];

return {
...config,
devIndicators: {
...config.devIndicators,
appIsrStatus: false,
},
env: {
...config.env,
NEXT_PUBLIC_BACKEND_URL: ENVS.backend_url,
NEXT_PUBLIC_FRONTEND_URL: ENVS.frontend_url,
},
transpilePackages: ['lucide-react', 'vitnode-frontend', 'vitnode-shared'],
experimental: {
...(config.experimental || {}),
reactCompiler: true,
},
transpilePackages: [
...transpilePackages,
'lucide-react',
'vitnode-frontend',
'vitnode-shared',
],
images: {
...(config.images || {}),
remotePatterns: [
...imageRemotePatterns,
{
protocol: urls.backend.protocol === 'https:' ? 'https' : 'http',
hostname: urls.backend.hostname,
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
"@tiptap/pm": "^2.10.3",
"@tiptap/react": "^2.10.3",
"@tiptap/starter-kit": "^2.10.3",
"babel-plugin-react-compiler": "19.0.0-beta-df7b47d-20241124",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/views/layout/root-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const generateMetadataRootLayout = async ({
const metadata: Metadata = {
manifest: `${CONFIG.backend_client_public_url}/assets/${locale}/manifest.webmanifest`,
icons: {
icon: `${CONFIG.backend_client_public_url}/assets//favicon.ico`,
icon: `${CONFIG.backend_client_public_url}/assets/favicon.ico`,
},
};

Expand Down
27 changes: 19 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8275b72

Please sign in to comment.