Name Last Update
client Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.gitignore Loading commit data...
package.json Loading commit data...
readme.md Loading commit data...
webpack.config.js Loading commit data...
yarn-error.log Loading commit data...
yarn.lock Loading commit data...

https://scotch.io/tutorials/setup-a-react-environment-using-webpack-and-babel

yarn config set registry 'https://registry.npm.taobao.org'

yarn add webpack webpack-dev-server path

yarn add babel-loader babel-core babel-preset-es2015 babel-preset-react --dev

yarn add html-webpack-plugin

yarn add react react-dom

yarn add --dev sass-loader node-sass

# 产品编译及压缩
# https://webpack.js.org/guides/production-build/
webpack -p

# 线上环境产生文件名带md5的文件
# https://webpack.js.org/guides/caching/

output: {
  path: path.resolve('dist'),
  filename: '[name].[chunkhash]_bundle.js'
}

# https://github.com/baldore/open-browser-webpack-plugin 打开浏览器