The Complete Guide for Setting Up React App from Scratch (feat. TypeScript)

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Purpose built for real-time analytics at any scale.
InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • webpack

    A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.

    import path from 'path'; import webpack from 'webpack'; import HTMLWebpackPlugin from 'html-webpack-plugin'; //create css file per js file: https://webpack.kr/plugins/mini-css-extract-plugin/ import MiniCssExtractPlugin from 'mini-css-extract-plugin'; import ReactRefreshWebpackPlugin from '@pmmmwh/react-refresh-webpack-plugin'; const isDevelopment = process.env.NODE_ENV !== 'production'; // define plugins const plugins: webpack.WebpackPluginInstance[] = [ new HTMLWebpackPlugin({ template: './public/index.html', // you have to have the template file }), ]; isDevelopment ? plugins.push(new ReactRefreshWebpackPlugin()) : plugins.push(new MiniCssExtractPlugin()); const config: webpack.Configuration = { mode: isDevelopment ? 'development' : 'production', devServer: { hot: true, port: 3000, }, entry: './src/index.tsx', // codes will be inside src folder output: { path: path.resolve(__dirname, 'build'), filename: 'index.js', // more configurations: https://webpack.js.org/configuration/ }, plugins, resolve: { modules: [path.resolve(__dirname, './src'), 'node_modules'], // automatically resolve certain extensions (Ex. import './file' will automatically look for file.js) extensions: ['.ts', '.tsx', '.js', '.jsx', '.scss', '.css'], alias: { // absolute path importing files '@pages': path.resolve(__dirname, './src/pages'), }, }, module: { rules: [ { test: /\.html$/, use: ['html-loader'], }, { test: /\.(js|jsx|ts|tsx)$/, exclude: /node_modules/, use: [ { loader: require.resolve('babel-loader'), options: { plugins: [ isDevelopment && require.resolve('react-refresh/babel'), ].filter(Boolean), }, }, ], }, { test: /\.(sa|sc|c)ss$/i, // .sass or .scss use: [ // Creates `style` nodes from JS strings 'style-loader', // Translates CSS into CommonJS 'css-loader', // for Tailwind CSS 'postcss-loader', // Compiles Sass to CSS 'sass-loader', ], }, ], }, }; export default config;

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • custom-react-setup

    A complete guide for setting up a React app with webpack, Babel, and TypeScript

    ๐Ÿ™ Please visit my GitHub repository for more settings and codes.

  • ts-loader

    TypeScript loader for webpack

    why I use @babel/preset-typescript over ts-loader and awesome-typescript-loader to complie TypeScript? it's blazingly faster than the others and has more perks(read #4) ts-loader doesn't natively support HMR(Hot Module Replacement) awesome-typescript-loader's latest release is on Jun 22, 2018 TypeScript With Babel: A Beautiful Marriage - Matt Turnbull's Post

  • awesome-typescript-loader

    Discontinued Awesome TypeScript loader for webpack

    why I use @babel/preset-typescript over ts-loader and awesome-typescript-loader to complie TypeScript? it's blazingly faster than the others and has more perks(read #4) ts-loader doesn't natively support HMR(Hot Module Replacement) awesome-typescript-loader's latest release is on Jun 22, 2018 TypeScript With Babel: A Beautiful Marriage - Matt Turnbull's Post

  • react-refresh-webpack-plugin

    A Webpack plugin to enable "Fast Refresh" (also previously known as Hot Reloading) for React components.

    as mentioned above, we're using the webpack; therefore, we're going to use @pmmmwh/react-refresh-webpack-plugin to apply the Fast Refresh feature to our app. I mean, it's for development, so what's the harm of trying it right?

  • webpack-cli

    Webpack's Command Line Interface

    webpack-cli(v5.0.1): enables you to use the command-line interface of the Webpack

  • React

    The library for web and native user interfaces.

    react(v18.2.0) : The react package contains only the functionality necessary to define React components. It is typically used together with a React renderer like react-dom for the web, or react-native for the native environments.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • react-router

    Declarative routing for React

    react-router-dom(v6.4.4): contains bindings for using React Router in web applications.

  • Babel (Formerly 6to5)

    ๐Ÿ  Babel is a compiler for writing next generation JavaScript.

    babel-loader(v9.1.0): allows transpiling JavaScript files using Babel and webpack.

  • postcss-plugins

    PostCSS Tools and Plugins

    w/ postcss-preset-env(v7.8.3): convert modern CSS into something most browsers can understand, determining the polyfills you need based on your targeted browsers or runtime environments. It takes the support data that comes from MDN and Can I Use and determine from a browserlist whether those transformations are needed. It also packs Autoprefixer within and shares the list with it, so prefixes are only applied when you're going to need them given your browser support list.

  • browserslist

    ๐Ÿฆ” Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env

    w/ postcss-preset-env(v7.8.3): convert modern CSS into something most browsers can understand, determining the polyfills you need based on your targeted browsers or runtime environments. It takes the support data that comes from MDN and Can I Use and determine from a browserlist whether those transformations are needed. It also packs Autoprefixer within and shares the list with it, so prefixes are only applied when you're going to need them given your browser support list.

  • autoprefixer

    Parse CSS and add vendor prefixes to rules by Can I Use

    w/ postcss-preset-env(v7.8.3): convert modern CSS into something most browsers can understand, determining the polyfills you need based on your targeted browsers or runtime environments. It takes the support data that comes from MDN and Can I Use and determine from a browserlist whether those transformations are needed. It also packs Autoprefixer within and shares the list with it, so prefixes are only applied when you're going to need them given your browser support list.

  • typescript-plugin-css-modules

    A TypeScript language service plugin providing support for CSS Modules.

  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • css-modules

    Documentation about css-modules

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Reactjs in Drupal with WebPack

    2 projects | dev.to | 23 Sep 2022
  • Can You Clear This Challenge Site Designed for Engineers?

    7 projects | dev.to | 12 Sep 2024
  • Modern Web Development with Turborepo, Next.js, TailwindCSS, NestJS, and Moreโ€ฆ

    11 projects | dev.to | 20 Aug 2024
  • TypeScript strictly typed - Part 2: full coverage typing

    3 projects | dev.to | 12 Jun 2024
  • React with Tailwind CSS Skeleton Loader Example

    2 projects | dev.to | 28 May 2024

Did you konow that TypeScript is
the 2nd most popular programming language
based on number of metions?