Skip to content

Commit f2a4541

Browse files
committed
fix: adding react compiler
1 parent 0544b2e commit f2a4541

File tree

9 files changed

+30
-6
lines changed

9 files changed

+30
-6
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Compiler",
3+
"phase": "setup",
4+
"description": "Add React Compiler",
5+
"link": "https://react.dev/learn/react-compiler",
6+
"modes": ["code-router", "file-router"],
7+
"type": "add-on",
8+
"priority": 50,
9+
"routes": []
10+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"devDependencies": {
3+
"babel-plugin-react-compiler": "^1.0.0"
4+
}
5+
}
Lines changed: 1 addition & 0 deletions
Loading

frameworks/react-cra/add-ons/db/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "TanStack DB",
44
"phase": "add-on",
55
"type": "add-on",
6-
"priority": 50,
6+
"priority": 48,
77
"modes": ["file-router"],
88
"link": "https://tanstack.com/db/latest",
99
"dependsOn": ["tanstack-query", "start"],

frameworks/react-cra/add-ons/drizzle/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Add Drizzle ORM to your application.",
44
"phase": "add-on",
55
"type": "add-on",
6-
"priority": 48,
6+
"priority": 46,
77
"link": "https://orm.drizzle.team/",
88
"modes": ["file-router"],
99
"dependsOn": ["start"],

frameworks/react-cra/add-ons/form/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "TanStack Form",
44
"phase": "add-on",
55
"type": "add-on",
6-
"priority": 46,
6+
"priority": 44,
77
"modes": ["file-router", "code-router"],
88
"link": "https://tanstack.com/form/latest",
99
"routes": [

frameworks/react-cra/add-ons/start/assets/vite.config.ts.ejs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ const config = defineConfig({
1616
}),
1717
<% if (tailwind) { %>tailwindcss(),<% } %>
1818
tanstackStart(),
19-
viteReact(),
19+
viteReact(<% if (addOnEnabled.compiler) { %>{
20+
babel: {
21+
plugins: ["babel-plugin-react-compiler"],
22+
},
23+
}<% } %>),
2024
],
2125
})
2226

frameworks/react-cra/project/base/vite.config.ts.ejs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default defineConfig({
1313
plugins: [<% for(const integration of integrations.filter(i => i.type === 'vite-plugin')) { %><%- integrationImportCode(integration) %>,<% } %> <% if(fileRouter) { %>tanstackRouter({
1414
target: "react",
1515
autoCodeSplitting: true,
16-
}), <% } %>viteReact()<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
16+
}), <% } %>viteReact(<% if (addOnEnabled.compiler) { %>{
17+
babel: {
18+
plugins: ["babel-plugin-react-compiler"],
19+
},
20+
}<% } %>)<% if (tailwind) { %>, tailwindcss()<% } %><% if (addOnEnabled['module-federation']) { %>, federation(federationConfig)<% } %>],
1721
resolve: {
1822
alias: {
1923
'@': fileURLToPath(new URL('./src', import.meta.url)),
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// This file is auto-generated. Do not edit manually.
22
// Generated from add-ons, examples, hosts, project, and toolchains directories
3-
export const contentChecksum = 'a764212c22f02af2f32bfd84918a2af90df10112b5ffaedfc825db426d615b1c'
3+
export const contentChecksum = '9955097b6723f7743c47d4ab8baa3100fddb88f3ab2f53c82666573b02934250'

0 commit comments

Comments
 (0)