From f35c0866d6aeab1abb68ad724538376660f6d918 Mon Sep 17 00:00:00 2001 From: Guillermo Alejandro Gallardo Diez Date: Sat, 4 Jan 2025 01:20:23 +0100 Subject: [PATCH] chore: handle dependencies --- templates/frontend/vite-react/package.json | 16 +++++++------- templates/frontend/vite-react/vite.config.js | 22 ++++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/templates/frontend/vite-react/package.json b/templates/frontend/vite-react/package.json index f25e610f..87055cba 100644 --- a/templates/frontend/vite-react/package.json +++ b/templates/frontend/vite-react/package.json @@ -1,7 +1,7 @@ { "name": "hello-near", "private": true, - "version": "0.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", @@ -32,21 +32,19 @@ "near-api-js": "^4.0.3", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-router": "^7.1.1" + "react-router": "^7.1.1", + "vite-plugin-eslint": "^1.8.1" }, "devDependencies": { "@eslint/js": "^9.17.0", - "@types/node": "^22.10.1", - "@types/react": "^18.3.17", + "@types/react": "^18.3.18", "@types/react-dom": "^18.3.5", - "@vitejs/plugin-react-swc": "^3.5.0", - "encoding": "^0.1.13", + "@vitejs/plugin-react": "^4.3.4", "eslint": "^9.17.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", "eslint-plugin-react-refresh": "^0.4.16", - "globals": "^15.13.0", - "vite": "^6.0.3", - "vite-plugin-eslint": "^1.8.1" + "globals": "^15.14.0", + "vite": "^6.0.5" } } diff --git a/templates/frontend/vite-react/vite.config.js b/templates/frontend/vite-react/vite.config.js index 32ad034d..8e4041a6 100644 --- a/templates/frontend/vite-react/vite.config.js +++ b/templates/frontend/vite-react/vite.config.js @@ -1,11 +1,11 @@ import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react-swc' +import react from '@vitejs/plugin-react' import eslint from 'vite-plugin-eslint'; import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'; // https://vite.dev/config/ export default defineConfig({ - plugins: [react(),eslint()], + plugins: [react(), eslint()], resolve: { alias: { '@': '/src', @@ -14,14 +14,14 @@ export default defineConfig({ }, optimizeDeps: { esbuildOptions: { - define: { - global: 'globalThis' - }, - plugins: [ - NodeGlobalsPolyfillPlugin({ - buffer: true - }) - ] + define: { + global: 'globalThis' + }, + plugins: [ + NodeGlobalsPolyfillPlugin({ + buffer: true + }) + ] } -} + } }) \ No newline at end of file