- extract-text-webpack-plugin
- bundle から テキストを抽出して別ファイルとして書き出す
module.rulesで指定した拡張子のファイルのバンドルに対してExtractTextPlugin.extract()で抽出する- 書き出すファイルは 
pluginsでnew ExtractTextPlugin('styles.css')のように指定する 
 
 - bundle から テキストを抽出して別ファイルとして書き出す
 - webpack.DllPlugin
- 開発時のビルド速度を改善するために使う
 - 普段の開発時の incremental build に毎回含める必要がないライブラリ類などを メインの成果物とは別にビルドし、これを参照するための manifest ファイルを作成する
 - 参照するには webpack.DllReferencePlugin を使用する
 
 - HtmlWebpackPlugin
- jantimon/html-webpack-plugin
 - webpack で bundle したファイルを読み込む html ファイルを生成する
- bundle したファイル名がビルド毎に変わる hash を持つ場合などに使う
 
 
 
- style-loader
- js から css を import したとき js で DOM に style 要素として追加する
 
 - css-loader
- css の 
@importとurl()から依存解決する - CSS Modules の機能もある
- options で 
modules: trueに - js 側から CSS class を読み込む
import styles from './app.css'<div className={styles.foo}>hello</div>;
 - CSS Modules について
 
 - options で 
 
 - css の 
 
yarn add -DE webpack-cliyarn add -DE extract-text-webpack-plugin@next- config file に 
mode: ('production'|'development')を適宜追加する - 🎼webpack 4: released today!!✨ – webpack – Medium
 Error: Chunk.entrypoints: Use Chunks.groupsIterable and filter by instanceof Entrypoint insteadextract-text-webpack-plugin@nextを利用する
- Error 
Hot Module Replacement is disabled.- devServer.hot - DevServer
 - 
Note that webpack.HotModuleReplacementPlugin is required to fully enable HMR. If webpack or webpack-dev-server are launched with the --hot option, this plugin will be added automatically, so you may not need to add this to your webpack.config.js.
 - いずれかの方法をとる
webpack-dev-server --hotで起動するdevServer.hotをtrue,pluginsにnew webpack.HotModuleReplacementPlugin()を追加する
 
 
https://twitter.com/about_hiroppy/status/1111864268490764288
webpack のビルドスピードを上げるコツ
- uglify を parallel で動かす
 - babel-loader 等の cache を有効にする
 - externals で対象外にする
 - cache-loader を利用する
 - thread-loader を利用する
 
- React & Webpack · TypeScript
 - GitHub - s-panferov/awesome-typescript-loader: Awesome TypeScript loader for webpack
 
- webpack-contrib/webpack-serve
- (2018-09) webpack-dev-server の後継になるはずだったが deprecated に
 - webpack-serve - npm
- npm に公開されている fork 版は更新が入ってるようにみえるし deprecated のテキストも消されている
 - shellscape/webpack-serve
 
 
 - webpack-contrib/webpack-hot-client