annyoung

React webpack build speed test (speed-measure-webpack-plugin) 본문

카테고리 없음

React webpack build speed test (speed-measure-webpack-plugin)

nopsled 2021. 10. 27. 14:12

https://github.com/stephencookdev/speed-measure-webpack-plugin

 

GitHub - stephencookdev/speed-measure-webpack-plugin: ⏱ See how fast (or not) your plugins and loaders are, so you can optimis

⏱ See how fast (or not) your plugins and loaders are, so you can optimise your builds - GitHub - stephencookdev/speed-measure-webpack-plugin: ⏱ See how fast (or not) your plugins and loaders are, s...

github.com

 

웹팩 잼병이라 그런지 어렵더라.. speed-measure-webpack-plugin 적용을 위해 열심히 삽질하는데 도통 알수가 없었다.

 

우선, CRA를 통해서 리액트 프로젝트를 만들었지만 ckeditor4에 의해서 eject하여 webpack 빌드해서 사용중이다.

 

config/webpack.config.js의 대략 136 라인에서 return { }하는걸 볼 수 있는데, 이 부분에서 smp.wrap을 통해 묶어주면 된다.

 

그럼 위처럼 webpack plugin에 따라 속도가 얼마나 되는지 테스트가 가능하다.

 

Comments