Posts

Showing posts from December, 2022

React Course Notes By Absar

Image
  . React Course . Installation From Scratch: Install Node js Install VS Code Open up terminal  npm init -y npm install react react-dom npm install @babel/core @babel/preset-env @babel/preset-react babel-loader Cr file in root dir .babelrc  Code: {   "presets": ["@babel/preset-react", "@babel/preset-env"] } npm install webpack webpack-cli webpack-dev-server Cr file in root dir webpack.config.js  https://github.com/developedbyed/simple-react-setup/blob/master/webpack.config.js Code: const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); module.exports = {   entry: "./src/index.js",   output: {     filename: "bundle.[hash].js",     path: path.resolve(__dirname, "dist"),   },   plugins: [     new HtmlWebpackPlugin({       template: "./src/index.html",     }),   ], ...