diff --git a/README.md b/README.md index 92e98e56..304792dd 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Depending on your targeted platforms you may need to install polyfills. The most ## Example use Check out the -[live version on StackBlitz](https://stackblitz.com/fork/reactfire-v4-sample)! +[live version on CodeSandbox](https://codesandbox.io/s/github/FirebaseExtended/reactfire/tree/main/example)! ```jsx import React from 'react'; diff --git a/example/.codesandbox/tasks.json b/example/.codesandbox/tasks.json new file mode 100644 index 00000000..a77a2f92 --- /dev/null +++ b/example/.codesandbox/tasks.json @@ -0,0 +1,18 @@ +{ + "setupTasks": [ + { + "name": "Install dependencies", + "command": "npm install" + } + ], + "tasks": { + "dev": { + "name": "Start dev server", + "command": "npm start", + "runAtStart": true, + "preview": { + "port": 5173 + } + } + } +} diff --git a/example/package.json b/example/package.json index b0267b8f..0204f355 100644 --- a/example/package.json +++ b/example/package.json @@ -9,23 +9,23 @@ }, "dependencies": { "firebase": "^9.0.0", - "react": "^17.0.0", - "react-dom": "^17.0.0", - "reactfire": "file:../reactfire-4.0.1.tgz", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "reactfire": "latest", "rollup-plugin-visualizer": "^5.7.1" }, "browserslist": [ "last 1 Chrome version" ], "devDependencies": { - "@types/react": "^18.0.15", - "@types/react-dom": "^18.0.6", - "@vitejs/plugin-react": "^2.0.0", + "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", + "@vitejs/plugin-react": "^4.0.0", "autoprefixer": "^10.4.8", "babel-preset-env": "^1.7.0", "postcss": "^8.4.14", "tailwindcss": "^3.1.7", - "typescript": "^4.7.4", - "vite": "^3.2.7" + "typescript": "^5.0.0", + "vite": "^5.0.0" } } diff --git a/example/vite.config.js b/example/vite.config.js index 4ccac774..da770990 100644 --- a/example/vite.config.js +++ b/example/vite.config.js @@ -10,4 +10,7 @@ export default defineConfig({ // Helps make sure we aren't pulling in extra deps visualizer({ template: 'treemap' }), ], + server: { + allowedHosts: true, + }, });