@fastify/react 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -143,7 +143,9 @@ export function createRoute ({ client, handler, errorHandler, route }, scope, co
143
143
  // Extend with route context initialization module
144
144
  RouteContext.extend(client.context)
145
145
 
146
- scope.get(route.path, {
146
+ scope.route({
147
+ url: route.path,
148
+ method: ['GET', 'POST', 'PUT', 'DELETE'],
147
149
  onRequest,
148
150
  // If either getData or onEnter are provided,
149
151
  // make sure they run before the SSR route handler
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "index.js",
4
4
  "name": "@fastify/react",
5
5
  "description": "The official @fastify/vite renderer for React",
6
- "version": "0.2.0",
6
+ "version": "0.3.0",
7
7
  "files": [
8
8
  "virtual/create.jsx",
9
9
  "virtual/root.jsx",
@@ -45,7 +45,7 @@
45
45
  "eslint-plugin-react": "latest"
46
46
  },
47
47
  "peerDependencies": {
48
- "@fastify/vite": "^5.0.3"
48
+ "@fastify/vite": "^5.0.5"
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"