0.0.1 • Published 3 years ago

@yuantech/sample-react-component v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

sample-react-component

Webpack template for a React app with TypeScript and ESLint

==Thanks to Carl Rippon's contribution in https://www.carlrippon.com/creating-react-app-with-typescript-eslint-with-webpack5/==

Start w/ a minimalistic package.json

{
    "name": "sample-react-component",
    "version": "0.0.1",
    "scripts": {
        "start": "webpack serve --config webpack.dev.config.ts",
        "build": "webpack --config webpack.prod.config.ts"
    }
}

Install the dev/prod dependencies

npm install react react-dom npm install -save-dev typescript npm install --save-dev @types/react @types/react-dom npm install --save-dev @babel/core @babel/preset-env @babel/preset-react @babel/preset-typescript @babel/plugin-transform-runtime @babel/runtime npm install --save-dev eslint eslint-plugin-react eslint-plugin-react-hooks @typescript-eslint/parser @typescript-eslint/eslint-plugin npm install --save-dev webpack webpack-cli npm install --save-dev webpack-dev-server @types/webpack-dev-server npm install --save-dev babel-loader npm install --save-dev html-webpack-plugin npm install --save-dev ts-node npm install --save-dev fork-ts-checker-webpack-plugin @types/fork-ts-checker-webpack-plugin npm install --save-dev eslint-webpack-plugin npm install --save-dev clean-webpack-plugin

Run the app

npm run start

Publish the "production" app

npm run build npm publish --access=public