作業系統
- Windows
- macOS
- Linux
設定開發環境
代碼格式輔助工具
輔助工具
Node.js及npm
- 下載長期開發版本
- 如何確認安裝成功,打開terminal或command prompt,
node -v
顯示安裝版本
Babel
- Babel是個JavaScript compiler,提供backward compatible syntax的支持。
- 安裝 Babel
npm i @babel/core @babel/node @babel/preset-env @babel/preset-es2015 @babel/preset-react -D npm i @babel/plugin-syntax-dynamic-import @babel/plugin-proposal-class-properties @babel/plugin-proposal-export-namespace-from @babel/plugin-proposal-throw-expressions -D
- 建立
.babelrc
{ "presets": [ "@babel/env", "@babel/react", ], "plugins": [ "@babel/plugin-syntax-dynamic-import", "@babel/plugin-proposal-class-properties", "@babel/plugin-proposal-export-namespace-from", "@babel/plugin-proposal-throw-expressions" ] }
Webpack
- 了解Webpack
- 安裝 Webpack
npm i webpack webpack-cli webpack-dev-middleware webpack-dev-server webpack-hot-middleware node-sass style-loader css-loader babel-loader mini-css-extract-plugin html-webpack-plugin -S