JS Project Setup with Webpack + TypeScript Install Webpack dependencies yarn add [email protected] [email protected] [email protected] [email protected] nodemon @faker-js/faker Install TS dependencies yarn add -D typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin ts-loader TS config (tsconfig.json) { "compilerOptions": { "outDir": "./dist/", "noImplicitAny": true, "module": "ESNext", "target": "ES2020", "jsx": "react", "allowJs": true, "moduleResolution": "node" } } Basic webpack.config.js const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { mode: 'development', devServer: { port: 8080, }, plugins: [ new HtmlWebpackPlugin({ template: './public/index.html', }) ], module: { rules: [ { test: /\.tsx?$/, use: 'ts-loader', exclude: /node_modules/, }, ], }, resolve: { extensions: ['.tsx', '.ts', '.js'], }, output: { filename: 'bundle.js', path: path.resolve(__dirname, 'dist'), }, }