My simple template for React with webpack apps.
Steps:
yarn init
yarn add [email protected] [email protected]
yarn add webpack webpack-cli webpack-dev-server --dev
yarn add babel-core [email protected] babel-plugin-transform-class-properties --dev
yarn add babel-preset-env babel-preset-react --dev
yarn add style-loader css-loader sass-loader node-sass --dev
yarn add normalize.css
"scripts": {
"build": "webpack",
"dev-server": "webpack-dev-server"
}touch webpack.config.js
Add source and output dirs, rules for Babel and SCSS.
touch .babelrc
Add React presets and plug in transform-class-properties
Pretty self-explanatory
yarn run build
Should work without errors
Add a few more bells and whistles from the links below, most notably the webpack HTML plugin.