This project serves as a comprehensive guide for using webpack effectively in web development. It covers essential features and provides practical insights and examples to help developers optimize their workflow and boost application performance
- Connect the environment variables
- Make different build scenarios: for production and development
- Connect HTML to the application using webpack, configure dynamic file names in order to prevent client side files from being cashed
- Add plugins to webpack
- Add Typescript support and other loaders
- Properly migrate webpack config to Typescript and use global.d.ts file
- Use dev server, watch mode for better development experience and why do we need the source map
- Connect react and jsx
- Support CSS styles and use SCSS preprocessor
- Properly decompose the large webpack config and make reusable components
- Isolate styles with CSS modules
- Implement routing, lazy components, decrease a size of the bundle
- Create aliases, module resolving
- Work with assets (images, icons and more)
- Properly work with global variables and what is tree shaking
- Speed up build proccess by extracting type checking to separate process
- Stop reloading page after changing the code with HMR (Hot Module Replacemenet)
- Use favicon and copy any other files to final build with copy plugin
- Use Babel and create own plugins with it
$ git clone https://github.com/sssshefer/webpack.git$ npm run start$ npm run build:dev$ npm run build:prod$ npm run typecheck