Skip to content

Commit 75a3f06

Browse files
authored
chore: replace Photon with +server (#218)
1 parent 4b0e7d1 commit 75a3f06

5 files changed

Lines changed: 9 additions & 784 deletions

File tree

examples/sentry/.testRun.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ function setupEnv() {
1717
}
1818

1919
function testRun(cmd: 'pnpm run dev' | 'pnpm run prod') {
20+
const isProd = cmd !== 'pnpm run dev'
2021
setupEnv()
2122
run(cmd, {
23+
serverIsReadyMessage: isProd ? 'Listening on' : undefined,
2224
// We intentionally throw errors to test Sentry error reporting
2325
tolerateError: ({ logText }) =>
2426
logText.includes('This is a test error sent to Sentry!') ||
2527
logText.includes('This is an async error sent to Sentry!') ||
26-
logText.includes('vike-photon is deprecated') ||
2728
logText.includes('[sentry-vite-plugin]'),
2829
})
2930

examples/sentry/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"prod": "vike build && node ./dist/server/index.mjs"
66
},
77
"dependencies": {
8-
"@photonjs/hono": "^0.1.12",
9-
"@photonjs/runtime": "^0.1.17",
108
"@sentry/react": "^10.22.0",
119
"@sentry/node": "^10.22.0",
1210
"@sentry/vite-plugin": "^4.6.0",
@@ -18,7 +16,6 @@
1816
"react-dom": "^19.2.0",
1917
"typescript": "^5.9.2",
2018
"vike": "^0.4.258",
21-
"vike-photon": "^0.1.26",
2219
"vike-react": "0.6.21",
2320
"vike-react-sentry": "0.1.0",
2421
"vite": "^7.3.0"

examples/sentry/pages/+config.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@ export { config }
22

33
import type { Config } from 'vike/types'
44
import vikeReact from 'vike-react/config'
5-
import vikePhoton from 'vike-photon/config'
65
import vikeReactSentry from 'vike-react-sentry/config'
76

87
const config = {
98
title: 'Vike + React + Sentry Example',
10-
extends: [vikeReact, vikePhoton, vikeReactSentry],
11-
// Photon configuration
12-
photon: {
13-
server: '../server/index.ts',
14-
},
9+
extends: [vikeReact, vikeReactSentry],
10+
server: true,
1511
} satisfies Config

examples/sentry/server/index.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)