From 0090aeec24a1701604fd81a2995e3b385e66ce28 Mon Sep 17 00:00:00 2001 From: miqlangelo Date: Tue, 6 May 2025 13:16:42 +0200 Subject: [PATCH] update --- .vscode/launch.json | 15 +++++++++++++++ src/06-compiler/my-react-app/src/App.tsx | 6 +++++- src/06-compiler/my-react-app/vite.config.ts | 10 +++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..d9e7f6d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:5173", + "webRoot": "${workspaceFolder}/src/06-compiler/my-react-app/" + } + ] +} diff --git a/src/06-compiler/my-react-app/src/App.tsx b/src/06-compiler/my-react-app/src/App.tsx index 4d1e350..3fb1a76 100644 --- a/src/06-compiler/my-react-app/src/App.tsx +++ b/src/06-compiler/my-react-app/src/App.tsx @@ -5,8 +5,12 @@ function App() { const handleClick = () => { const a = 1; const b = 2; + const obj = { + a, + b, + }; const c = a + b; - console.log(c); + console.log(c, obj); }; return ( diff --git a/src/06-compiler/my-react-app/vite.config.ts b/src/06-compiler/my-react-app/vite.config.ts index 8b0f57b..a8d7fda 100644 --- a/src/06-compiler/my-react-app/vite.config.ts +++ b/src/06-compiler/my-react-app/vite.config.ts @@ -1,7 +1,11 @@ -import { defineConfig } from 'vite' -import react from '@vitejs/plugin-react' +import react from '@vitejs/plugin-react'; +import { defineConfig } from 'vite'; // https://vite.dev/config/ export default defineConfig({ plugins: [react()], -}) + build: { + sourcemap: true, + }, +}); +