Skip to content

Commit

Permalink
using react 18 & updated vite config
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitan Elbaz authored and Eitan Elbaz committed Nov 21, 2023
1 parent 8fd4926 commit 36c31ce
Show file tree
Hide file tree
Showing 3 changed files with 456 additions and 15 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "react-grand-tour",
"version": "0.14.0",
"type": "module",
"description": "",
"main": "./dist/main.cjs.js",
"module": "./dist/main.es.js",
Expand Down Expand Up @@ -31,11 +32,13 @@
},
"homepage": "https://github.com/EitanElbaz/ReactGrandTour",
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-use": "^17.4.0"
},
"peerDependencies": {
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@rollup/plugin-typescript": "^8.2.1",
Expand All @@ -44,6 +47,7 @@
"@types/react-dom": "^18.2.16",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.54.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
Expand Down
11 changes: 7 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { defineConfig } from 'vite';
import typescript from '@rollup/plugin-typescript';
import path from 'path';
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
import react from '@vitejs/plugin-react';

export default defineConfig({
plugins: [],
plugins: [react()],
resolve: {
alias: [
{
Expand All @@ -13,9 +14,6 @@ export default defineConfig({
},
],
},
esbuild: {
minify: true,
},
build: {
manifest: true,
minify: true,
Expand All @@ -27,6 +25,11 @@ export default defineConfig({
},
rollupOptions: {
external: ['react', 'react-dom'],
output: {
globals: {
react: 'React',
},
},
plugins: [
typescriptPaths({
preserveExtensions: true,
Expand Down
Loading

0 comments on commit 36c31ce

Please sign in to comment.