diff --git a/2-copy-of-code/lesson-11/chatbot-project/package-lock.json b/2-copy-of-code/lesson-11/chatbot-project/package-lock.json index 0fc5788..b1efda5 100644 --- a/2-copy-of-code/lesson-11/chatbot-project/package-lock.json +++ b/2-copy-of-code/lesson-11/chatbot-project/package-lock.json @@ -17,6 +17,7 @@ "@types/react": "^19.0.1", "@types/react-dom": "^19.0.2", "@vitejs/plugin-react": "^4.3.4", + "babel-plugin-react-compiler": "^19.1.0-rc.2", "eslint": "^9.15.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", @@ -1569,6 +1570,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/babel-plugin-react-compiler": { + "version": "19.1.0-rc.2", + "resolved": "https://registry.npmjs.org/babel-plugin-react-compiler/-/babel-plugin-react-compiler-19.1.0-rc.2.tgz", + "integrity": "sha512-kSNA//p5fMO6ypG8EkEVPIqAjwIXm5tMjfD1XRPL/sRjYSbJ6UsvORfaeolNWnZ9n310aM0xJP7peW26BuCVzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.26.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", diff --git a/2-copy-of-code/lesson-11/chatbot-project/package.json b/2-copy-of-code/lesson-11/chatbot-project/package.json index 3c8dcb9..5dfab77 100644 --- a/2-copy-of-code/lesson-11/chatbot-project/package.json +++ b/2-copy-of-code/lesson-11/chatbot-project/package.json @@ -19,6 +19,7 @@ "@types/react": "^19.0.1", "@types/react-dom": "^19.0.2", "@vitejs/plugin-react": "^4.3.4", + "babel-plugin-react-compiler": "^19.1.0-rc.2", "eslint": "^9.15.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "^5.0.0", diff --git a/2-copy-of-code/lesson-11/chatbot-project/vite.config.js b/2-copy-of-code/lesson-11/chatbot-project/vite.config.js index 8b0f57b..f093458 100644 --- a/2-copy-of-code/lesson-11/chatbot-project/vite.config.js +++ b/2-copy-of-code/lesson-11/chatbot-project/vite.config.js @@ -3,5 +3,9 @@ import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react({ + babel: { + plugins: [['babel-plugin-react-compiler', { target: '19' }]], + }, + })], })