Skip to content

Commit

Permalink
feat: add new netlify template (#4812)
Browse files Browse the repository at this point in the history
- added netlify template for react-router based on
remix-run/react-router-templates#40
- fixed images optimization on deployed site (legacy templates still
broken)
- added deploy script

Can be tested with `npx webstudio@0.0.0-c1d6247`

Gonna remove legacy netlify templates in separate PR

<img width="578" alt="image"
src="https://github.com/user-attachments/assets/2d19de74-36be-48a0-8511-9ce1665b755d"
/>
  • Loading branch information
TrySound authored Feb 2, 2025
1 parent f3d7805 commit b9f84e7
Show file tree
Hide file tree
Showing 42 changed files with 1,855 additions and 68 deletions.
10 changes: 5 additions & 5 deletions fixtures/react-router-docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"fixtures:build": "pnpm cli build --template docker --template .template && pnpm prettier --write ./app/ ./package.json ./tsconfig.json"
},
"dependencies": {
"@react-router/dev": "^7.1.4",
"@react-router/fs-routes": "^7.1.4",
"@react-router/node": "^7.1.4",
"@react-router/serve": "^7.1.4",
"@react-router/dev": "^7.1.5",
"@react-router/fs-routes": "^7.1.5",
"@react-router/node": "^7.1.5",
"@react-router/serve": "^7.1.5",
"@webstudio-is/image": "workspace:*",
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
Expand All @@ -26,7 +26,7 @@
"isbot": "^5.1.22",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.4",
"react-router": "^7.1.5",
"vite": "^5.4.11",
"webstudio": "workspace:*"
},
Expand Down
6 changes: 6 additions & 0 deletions fixtures/react-router-netlify/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
/node_modules/

# React Router
/.react-router/
/build/
3 changes: 3 additions & 0 deletions fixtures/react-router-netlify/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
force=true
# to support using NODE_OPTIONS for windows tests
shell-emulator=true
3 changes: 3 additions & 0 deletions fixtures/react-router-netlify/.template/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
force=true
# to support using NODE_OPTIONS for windows tests
shell-emulator=true
12 changes: 12 additions & 0 deletions fixtures/react-router-netlify/.template/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"dependencies": {
"@webstudio-is/image": "workspace:*",
"@webstudio-is/react-sdk": "workspace:*",
"@webstudio-is/sdk": "workspace:*",
"@webstudio-is/sdk-components-animation": "workspace:*",
"@webstudio-is/sdk-components-react": "workspace:*",
"@webstudio-is/sdk-components-react-radix": "workspace:*",
"@webstudio-is/sdk-components-react-router": "workspace:*",
"webstudio": "workspace:*"
}
}
5 changes: 5 additions & 0 deletions fixtures/react-router-netlify/.template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"customConditions": ["webstudio"]
}
}
3 changes: 3 additions & 0 deletions fixtures/react-router-netlify/.webstudio/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"projectId": "d845c167-ea07-4875-b08d-83e97c09dcce"
}
Loading

0 comments on commit b9f84e7

Please sign in to comment.