For production builds it's recommended to extract the CSS from your bundle being able to use parallel loading of CSS/JS resources later on. This can be achieved by using the mini-css-extract-plugin, because it creates separate css files. For development mode (including webpack-dev-server) you can use style-loader, because it injects CSS into the DOM using multiple <style></style> and works faster.
배포: style-loader
< mini-css-extract-plugin
나중에 CSS/JS를 병렬적으로 로딩하기 위해 사용할 수 있는 별개의 CSS 모듈로 추출하는 것이 더욱 좋기 때문에
mini-css-extract-plugin
을 선호한다.개발: style-loader
> mini-css-extract-plugin
개발 모드에서는 (webpack-dev-server)인라인 파일에 대해서는 DOM에 CSS를 주입시키는 것이 좋다. 왜냐하면 DOM 안에 여러 개의
style
태그를 주입시켜주기 때문에, 작동 자체에 있어서 빠르기 때문이다.