How To Simplify React Import Statements: A Guide for Create React App, Vite, and Webpack

Published: 02 December 2023
on channel: Coding Mastery
353
15

Build Expense Manager App Using React And TypeScript: https://bit.ly/3FWpitj

In this video, you will learn how to create a better import statement configuration for the React application when working with nested folder structures.

This video will help you avoid using relative paths for deeply nested components/files, using jsconfig.json for create-react-app, vite.config.js for vite.js and alias configuration in webpack.config.js file.

If you're using TypeScript, use tsconfig.json instead of jsconfig.json file.

Buy me a coffee☕️: https://www.buymeacoffee.com/myogeshc...

🔗 GitHub Source Code:
1. Webpack: https://github.com/myogeshchavan97/si...
2. Vite: https://github.com/myogeshchavan97/si...
3. create-react-app: https://github.com/myogeshchavan97/si...

Timestamps ⏰

00:00 - Getting Started
02:20 - Configuration for Vite.js
04:53 - Configuration for Webpack

📚 My Courses: https://courses.yogeshchavan.dev/
📝 My Blog: https://blog.yogeshchavan.dev/
💼 LinkedIn:   / yogesh-chavan97  
🐦 Twitter:   / myogeshchavan97  
📦 GitHub: https://github.com/myogeshchavan97

🔔 Do subscribe to the channel and press the bell icon to receive all future notifications.